-
Notifications
You must be signed in to change notification settings - Fork 719
[css-inline] inline-sizing property name is too similar to inline-size #5189
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
Since |
Well, it affects the border box and padding box sizes as well. :) And content-size/content-sizing sounds like it would apply to much more than just inline boxes... |
hmm, ok, making names more clearly scoped usually makes them longer, which isn't always a bad thing. |
One earlier suggestion was |
|
|
Problem with |
What about something like |
OK, after reading the description again & double checking with fantasai, I think I understand this property enough to make suggestions. Starting with my own response to my requests for explanatory figures… Here is the “normal” behavior for sizing inlines (as indicated by background colors on the various inline elements). The superscript uses the default HTML Because of the change in font size on the superscript, it's line box isn't the same height as the other line boxes. Because of its change in alignment, it also pushes the entire line it is on away from the line above, so that the other inlines do not use up the full cross-size of that line box. In contrast, if all the inline elements used the new “stretch“ sizing, you would get (correct me if I'm wrong, @fantasai!) something that looks like this. All the inlines in that line have the same height, which fills the full height of the line, even after the line gets extra space to accommodate the superscript: And for added clarity, an example if the wrapper So, back to bikeshedding… To me, the closest analogy here is cross-axis stretch alignment in flexbox: that is, the But, I think it might be useful to focus on the “cross-axis” terminology, to reduce the confusion between inline elements and the inline layout direction. Another very similar property, to me, is the Would it make sense to call the Or |
P.S. if folks disagree with me that I don't like |
I like the way you're thinking about this.
TL;DR: I'd go with |
Maybe just |
Another concern is trying to make it a bit more obvious that this property is about inline layout, and not generally applicable? |
Suggestions off a twitter thread: |
However, I'm not convinced that naming this |
Riffing off that last suggestion, maybe |
This is a bit of a tangent, but it affects the name choice: If such a thing were to be added in the future, then names like |
How so? This is about extending the dimensions of an inline element to fit the calculated dimensions of the line-box. Using |
@AmeliaBR There is something related: see https://drafts.csswg.org/css-text-4/#line-padding-property - it is not exactly what you had in mind (as currently specified), but it is about extending the background area in the inline direction. One difference is that using it reduces the space available for layout (in a predictable way so no loops need to happen), whereas for the background height adjustment, the layout is unchanged. I'm not sure if that means we have to consider them distinctly, but the idea of a single property that affects the background painting in both axes is certainly appealing to me. |
The CSS Working Group just discussed The full IRC log of that discussion |
Given that the use case is mainly for text backgrounds, I think a text- prefix might make sense (perhaps it's easier to explain how a text-* property applies to all inlines than to explain how an inline-* property doesn't affect layout?). So I think |
Yeah, "text" seems close-enough here; it gives the right idea, at least better than "line" or "inline". Similarly, I think "background" might be close enough, even tho it affects all the other decorations too; they'll all be things surrounding the bg area, so that should probably be obvious? I do still like @fantasai's argument for |
|
Maybe |
Just for info, that was also suggested in the twitter thread. |
... could always go back to More seriously, I was hoping to experiment with applying this facility to system color pairings, but I obviously can't do that until, well, sometime after it is given an actual name. |
How about |
A bit crazy brainstorming-style suggestion: since the property in question is about the logical height of the inline element, what about, instead of introducing a completely new property, just make the plain old (I would even consider accepting percentages with |
@SelenIT Remembered why we didn't do that: See https://lists.w3.org/Archives/Public/www-style/2018Apr/0028.html and #1974 for where we added the property. |
Random idea: what if we made this a keyword on the |
CSS Inline currently defines an
inline-sizing
property that changes how the height of inline boxes is calculated.The name is a problem because we have an unrelated
inline-size
property for declaring width or height based on the logical writing-mode.As far as I know, there are no implementations of
inline-sizing
. There are definitely implementations ofinline-size
.So this issue is to bikeshed a new name for the property as described in the spec.
(Note that I personally do not understand enough about inline layout to interpret that description, so I cannot offer any good suggestions. Only that it shouldn't be the same as another property with a grammatical tense change. If someone is able to draw some pretty pictures demonstrating how this property would affect layout, that might help other people come up with name suggestions!)
The text was updated successfully, but these errors were encountered: