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-display-4] Add inner and outer display properties #4729
Comments
See https://drafts.csswg.org/css-display-3/#changes
So maybe for level 4? |
Yeah, one of the key restrictions here being that nobody wants to implement |
I don't understand this objection. Since the current spec already supports a two-value syntax, then can't people can already specify that combination? Unless it's illegal, in which case what difference would having separate properties for Furthermore, given the whole web development industry, both standards-based (web components) and framework-based (React, Angular, Vue, etc.) has spent that last decade pursuing component-oriented development, why is a single problematic combination being allowed to prevent the delivery of a basic mechanism of layout encapsulation, the lack of which is a huge pain point? I'd really like to give people the benefit of the doubt here, but the dropping of |
No,
If
So
It's not that simple. There is no mechanism to treat a usually valid value as invalid syntax depending on the value of another property. Actually this can't be done at specified value time, since we may not know the resolved values of both properties until computed-value time (there might be a What could potentially be done is, at computed-value time, say that e.g. if However, if in the future browsers are willing to implement a Is the risk worth it? I don't know, but if you think so, it may be better if you read the spec, come with a clear proposal, and try to convince the editors about that. Saying that they are disconnected from the reality of contemporary web development is not productive. |
Uhm, I literally implemented them in Gecko and asked you to add them to the spec in #3940 (comment).
Not if #3940 is adopted. |
@Loirooriol I didn't say the editors were disconnected, I said the output of the standards process is in this case. And from the perspective of an author, it clearly is. The issue you describe needs a resolution of some kind, but the worst-case impact of any conceivable resolution would still be better than the actual impact right now of such a fundamental encapsulation use-case being missing from the platform. As for how it should be resolved, you say there are actually various options, so why not just have a discussion during a face-to-face meeting, reach a consensus on the least-worst, and go with that? As for the argument re. forwards compatibility, that seems entirely fallacious, in that the same objection applies the entire design of CSS. I can put |
As @MatsPalmgren pointed out, From a gut feeling, I'd say keeping the computed value of Sebastian |
Would be nice to maybe return to this? I, and others (https://mastodon.social/@ollicle/111146605034670150) would really want to see separate properties for these, though usually we'd also want to toggle the Like, I cannot see why we can't allow Even more: I think in my practice the most common case was always: to keep the |
With a separate longhand that controls the display of the box within the box tree (e.g. a Taking your example, a Sebastian |
Yes. Having separate properties for these 3 things would be A-MA-ZING. |
CSS display level 3 adds the great change of allowing controlling the inner and outer display of an element. However it does not give a way to control them independently.
e.g. Consider a web component with a shadow root that would like to lay out its internals:
In this case the grid styling is important for the functionality of the component, however this comes with a couple caveats:
user-summary { display: inline grid; }
!important
breaks the ability to makeuser-summary
a different outer styleAs such I'd like to propose adding
display-inside
/display-outside
as individual properties, then the styles could be written as such:The text was updated successfully, but these errors were encountered: