-
Notifications
You must be signed in to change notification settings - Fork 707
[css-text-4][css-flex][css-grid] 'auto' value needed for text-space-trim to cover white space discarding between flex and grid items? #3124
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
Why do you want this white space to appear? |
I don't want this white space to appear but to explain why there is no white space. And this explanation can happen via Sebastian |
Well, the question you probably actually wanted to ask is, why should And there may even be use cases for having white space between flex items, like for the text in https://jsfiddle.net/SebastianZ/Lvds0wpj/. Sebastian |
If there's no use case, then there's no need to add the feature. Adding feature is work not just for the spec editors, but also for implementers and testers. And it also increases the knowledge overhead for authors and educators. We do not add features just because it sounds nice, we add them because they're useful. If all you need is an explanation, then it's this: text runs consisting of white space are always discarded except when occurring as inline-level content. We don't need a property to exist to “explain” why this happens. |
I didn't say to add it because it "sounds nice" but to make
While the definition of
Can you point me to the spec. where this is defined, please? (The citation above only specifies the discarding of white space for flex and grid items, but I coun't find this general definition yet.) Sebastian |
Updating the Applies to line to be more precise makes a lot more sense than adding a new feature that has no use case, though?
There's no general statement anywhere afaik, since white space discarding is defined per layout mode, but it is true. |
Yep.
Especially, I couldn't find the one that says that this applies to block-level elements. I guess it would be easier to maintain and reference if the statement was centralized somewhere instead of duplicating it for every layout mode. Sebastian |
If the child text between flex and grid items only consists of white space, it is not rendered.
This is as if
text-space-trim
was set todiscard-before discard-after
for those items. Though the default value oftext-space-trim
isnone
, which contradicts the whitespace discarding logic in flex and grid layout.Therefore I think an
auto
value needs to be introduced fortext-space-trim
and be made the initial value.The computed value may then still be
auto
, or be eithernone
ordiscard-before discard-after
depending on the layout type.Sebastian
The text was updated successfully, but these errors were encountered: