-
Notifications
You must be signed in to change notification settings - Fork 708
[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<TabAtkins> Topic: inline-sizing is too similar to inline-size<TabAtkins> nigel: Semantics of the feature aren't in question, but name is. <TabAtkins> nigel: Many proposals that people ahve added to the thread <Rossen_> q? <TabAtkins> nigel: A bit of side topic - if you think about the problem differently, this is about extending the backgroudn area in the inline direction, at the end of each line, so the text isn't up against the edge of the bg, often used in captions <TabAtkins> florian: I think we're confusing two features here. <TabAtkins> florian: line-padding is still called line-padding and is in Text 4. <TabAtkins> florian: This is a diff feature. Hence its name is confusing, since it confused you about it. ^_^ <TabAtkins> nigel: Ah right, so this is more about expending the size in the block direction <TabAtkins> nigel: But line-padding did come up as a similar topic in the thread, as a possible direction to think about things together. <TabAtkins> nigel: Not sure they shoudl be, they seem distinct to me <TabAtkins> Rossen_: So I see line-fit, inline-fit, inline-area <TabAtkins> Rossen_: Then a long list from twtiter <Rossen_> box-decoration-fill, line-height-sizing, inline-background-painting, inline-logical-height-sizing, line-stretch or inline-stretch, inline-cross-direction-sizing, inline-fill-type, inline-box-sizing, line-sizing, vertical-sizing-rule, line-fill or line-fit <Rossen_> TabAtkins: suggest we avoid the word inline <TabAtkins> florian: That's also the trick, it's not about "the line". It's about the block direction of inlines. <TabAtkins> TabAtkins: Right, I just meant "line" was okay re: my objection. <TabAtkins> faceless2: This feels similar to leading, could use that in the name. <TabAtkins> Rossen_: Do we have other terms of art we could try to borrow? <TabAtkins> astearns: 'leading' seems fair game in this <TabAtkins> fantasai: It's not about leading - it doesn't affect layout. <TabAtkins> fantasai: It just changes the size of the bg/border area of inline boxes, in the block direction. <TabAtkins> fantasai: Other thing to consider is possible future directions for this property. <TabAtkins> fantasai: So ultimately it'sa bout the height of the inline box <TabAtkins> fantasai: So we might want to change how we fit around text <TabAtkins> fantasai: Right now it's just "fit the text" or "fit the line". <Rossen_> q? <TabAtkins> Rossen_: Is layout not in scope for this property, then? <TabAtkins> florian: inline-paint-height? <TabAtkins> Rossen_: inline-background-extent? <TabAtkins> fantasai: It affects all the box properties, in terms of where they apply graphically. <fantasai> https://github.com//issues/5189#issuecomment-661268373 <TabAtkins> fantasai: Amelia created some nice illos <TabAtkins> florian: I think "inline-*-extent" would have the same confusion <TabAtkins> fantasai: I liked inline-fit because it does describe how it actually works. So like "inline-fit" or "line-fit" or something else? <TabAtkins> florian: At some point Amelia proposed box-decoration-*, I assume we're not doing that? <TabAtkins> fantasai: That implies more general. It's super long for one. <TabAtkins> florian: inline-box-decoration-height? A mouthful... <TabAtkins> jfkthame: inline-box-height? <TabAtkins> Rossen_: That'll excite people - it says layout to me. <tantek> better than inline-block-height <TabAtkins> faceless2: *-shape, we kinda use that elsewhere? <TabAtkins> Rossen_: Shape implies geometry, not just size. <TabAtkins> fantasai: I feel like this is something we come back to during a break, after people ahve some time to think about it. <tantek> +1 come back to it during a break <fantasai> inline-box-fit? <TabAtkins> Rossen_: Sounds good, we got awareness on the issue. <TabAtkins> Rossen_: So we'll continue discussion during the break. <dholbert> maybe "decoration" is fine after all; it was making me think "text-decoration", but now I'm remembering we have box-decoration-break etc. as well <nigel> github: https://github.com//issues/5189 |
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: