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-box-4] Longhand values of margin-trim
allow more combinations than shorthand values
#7884
Comments
I think it looks simpler like this:
|
@Loirooriol Your version doesn't allow full reordering. |
Really? I think the issue is rather that some square brackets are missing, at least for readability. So the above syntax can be interpreted as
Which seems correct to me. Sebastian |
The brackets can be omitted, see https://drafts.csswg.org/css-values-4/#component-combinators
But yeah I guess
|
I know. That's why I wrote "at least for readability".
I still don't get that. According to the binding rules and the examples in the spec., your syntax and the one with brackets provided by me seem to be the same. And they both allow all possible combinations and orders, e.g. also Though that aside, I think we agree that the current syntax needs to be changed to allow combining the shorthand with the longhand values, right? Sebastian |
Ah, now I get it! @Loirooriol's suggested syntax doesn't allow combinations like Sebastian |
I'm not sure this is actually useful, and it certainly makes the grammar more convoluted, but the effect of it is fairly straightforward. Agenda+ to ask the WG what it thinks. |
The one thing I do note, tho, is that it seems the only way to say you want to trim all the edges is, currently, to list all four explicitly. That seems weird, for what I suspect is a reasonable case. I suggest either (1) add |
My one hesitation with |
With the change of #6643 we can now have different combinations of
block-*
andinline-*
values for themargin-trim
property.The current syntax is:
This syntax allows combinations of
*-start
and*-end
values that for both block and inline directions. Currently, those cannot be represented by the shorthand valuesblock
andinline
.To allow to express those cases in a more condense way, I suggest to allow to combine the longhand and shorthand values.
The syntax would then be:
Sebastian
The text was updated successfully, but these errors were encountered: