-
Notifications
You must be signed in to change notification settings - Fork 719
[css-text] Syntax for percentage-of-width-of-space for 'word-spacing' #3232
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
Comments
An "sp" unit? This always struck me as an obvious gap in the font-related units, and it's no different to calculating "ch" or "ic" |
That would inherit as a length, and we're looking for something that inherits as a proportion. An |
A new unit is probably overkill for this. Perhaps just a function would work better? |
Alternately, just |
I can't think of a good name for a function, so I think I slightly prefer a raw number. |
I'm really against infecting more properties with " |
If there was a function, could you calc inside it? |
A function that resolved to a |
It looks like How would one represent the concept of "Please set my word spacing to 130% of the space width" in a way that is compatible with Would Or maybe you're suggesting something like |
The calc() problem I'm talking about is that, in a calculation, plain numbers need to be scalars: if a property takes a length, it's always valid to multiply the length by a scalar ( So yeah, if you wanted to use that last option, then (I personally think it's completely fine to have more single-use-case units, even or especially ones with longer names to indicate their special-purpose-ness. |
|
I'm not too sure why a function is preferable to a unit. Can you explain? |
From Myles' earlier comment:
|
When I said "overkill" I meant "I see no use case for this outside the property in question, so let's scope the feature accordingly." |
@litherum Well, there's
|
Also, as @frivoal mentioned, this needs to inherit as itself and not as a |
I think we have a few options here:
If we're taking any of the new syntax options, we might consider also allowing bare Please note that while in |
Yes, tab-size is currently a number. It's terrible, and I'm going to push very strongly against spreading this precedent any further. It's currently contained to exactly two properties and I don't want it going any further when there's no reason for it. In other words, the goodness of (very vague) precedent is overwhelmed by the practical badness of it. It is absolutely bad to have a length-ish value that can't be combined with other length-ish values. If vague precedent is the only reason for doing this I'm going to strongly object to it.
So this means that the precedent of tab-size is even less applicable.
No need for this, we can still call it a The unit would just be context-sensitive, and probably, uh, resolve to 0 in any other property I guess? Or perhaps resolve relative to |
No we don't. They all compute to an absolute length. All lengths compute to each other, that's what makes them the same fundamental type. |
No, length-percentages don't becomes lengths until used value time. When a value can be converted to its canonical unit isn't part of the definition of a type. Once again, my argument is that making a |
|
The CSS Working Group just discussed
The full IRC log of that discussion |
You may want to consider how allowing SVG1.1 defines SVG2 redefines the property so that it doesn't allow lengths without a unit identifier. However, presentation attributes still replace instances of Safari, Firefox and Chrome support |
Ah shoot, and word-spacing is on the list of properties that allow Agenda+ to reverse the resolution and just define a unit, then. |
Can we use (The main impediment to this being that certain people decided to alias |
Right, |
The CSS Working Group just discussed
The full IRC log of that discussion |
We just resolved in #2165 to make percentages be relative to the current font size (like ems, but not computing to an absolute length for inheritance). That means we need a different syntax to represent a length proportional to the width of a space (that inherits as a proportion).
The text was updated successfully, but these errors were encountered: