-
Notifications
You must be signed in to change notification settings - Fork 672
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 |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> none | block | inline | [ inline-start || inline-end || block-start || block-end ]<jarhar> fantasai: the current syntax of margin trim looks liek this, which doesnt very eaily allow the ability to say all of the sides <fantasai> none | <fantasai> [ block || inline ] | <fantasai> [ block || inline-start || inline-end ] | <fantasai> [ inline || block-start || block-end ] | <fantasai> [ inline-start || inline-end || block-start || block-end ] <jarhar> fantasai: there was a suggestion to allow all possible combinations that make any sense <jarhar> fantasai: then there was tabs alternative proposal which was to change the block or inline the original syntax to a double or which would look like <fantasai> none | [ block || inline] | [ inline-start || inline-end || block-start || block-end ] <jarhar> fantasai: im not sure how often peoplw ant to trim 3 our of 4 sides and if they really want to they can list 3 keywords instead of 2 <jarhar> TabAtkins: the third keyword would be slightly longer <jarhar> fantasai: i suggest we accept tabs proposal <una> q+ <jarhar> una: i like it lets do it <miriam> ack una <bramus> +1 <jarhar> miriam: the other proposal in there about all, is that something that needs discussion? <jarhar> TabAtkins: it was my suggestion, i dont care. elikas hesitation ?? <oriol> q+ <jarhar> una: i wouldnt mind having both all and block inline but if there is risk for future compat then im happy with just block inline <miriam> ack oriol <TabAtkins> s/??/hesitation about confusion with possible future additions makes sense to me/ <jarhar> oriol: are we then allowing combination of horziontal block wth inline keywords? the second thing you wrote isnt allowing those combinations? <jarhar> fantasai: yeah you cant write block inline start if you wanted to do that youd have to write block start inline start block end <jarhar> una: its like margin <jarhar> fantasai: i think thats ok <jarhar> fantasai: proposed resolution is to allow the combination of block and inline keywords <jarhar> miriam: any objections to that resolution? <fantasai> RESOLVED: Allow combination of 'block' and 'inline' keywords in 'margin-trim' |
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: