-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-sizing-4][css-grid-2][css-align-4] Rename 'ar' unit? #3225
Comments
What if we didn't add a new unit type exactly, but made it so box size properties could instead just accept a "unit-less" float that always represents the ratio/relationship of the dimension of the property it is declared upon to its opposing axis? Or possibly always block to inline size regardless of declared property? height: 2; width: calc(1 / 3); block-size: 1.5 min-inline-size: 3 I know this is still adding a new *unit, just a slightly different way about the syntax? |
@jonjohnjohnson we're not likely to add any new unit-less values in CSS. Over the years we have found it's much better to be explicit about what the numbers in CSS values mean. |
@astearns I've noticed that and find it understandable, especially for typing. I just wasn't sure of the value in adding new unit types piecemeal. Though |
@jonjohnjohnson There's a decent chance we'll want to allow this as a track size in Grid, at which point it needs to not conflict with |
The CSS Working Group just discussed The full IRC log of that discussion<fantasai> Topic: Renaming ar unit<fantasai> github: https://github.com//issues/3225 |
I thought about this a lot on the plane from TPAC to View Source today. @fantasai wants to use a two character unit where the second letter is an 'r', so that it matches 'fr' well. So I make a list of every combination: ar, br, cr, dr, etc... and crossed out all the ones that don't work (like br, ir, lr... too confusing or weird). Purely looking at letter combinations, and thinking about what something-'r' units we might make up in the future, these are options:
But then I started realizing, well,
|
This issue is also being discussed in #333 and #1173. The "tr" (or "ar") unit either relates the width to the height or relates the height to the width. I think this could be confusing. Code would be easier to read if '%w' is used for width and '%h' is used for height. So for example;
"%w" and "%h" are only suggestions: they could be just "w" and "h" (subject to comments in other threads). If "tr" is favoured, I suggest it should be a percentage value like "vw" and "vh" (as was proposed for "ew").. |
@jensimmons was wondering if we should rename the
ar
unit to something else, since it's not exactly an aspect ratio. Not sure what, though. Maybetr
for “transfer ratio”?The text was updated successfully, but these errors were encountered: