W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2020

Re: [csswg-drafts] [css-contain-2] Combination of shortcuts and values (#5506)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Tue, 15 Sep 2020 13:44:34 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-692724381-1600177473-sysbot+gh@w3.org>
IMO this depends on #5511. If shortcut values have the same computed value as the expanded list of values, according to the [shortest serialization principle](https://drafts.csswg.org/cssom/#serializing-css-values) the serialization should try to use shortcuts.

However, if we allow mixing shortcuts with other values, we may end up having multiple minimal solutions. For example, we have `content = layout paint`, if in the future we add `foobar = style paint`, then `layout style paint` could be serialized as either `content style` or `foobar layout`.

So if we allow mixing shortcuts with other values, I think we should either:
 - In #5511 say that shortcut values compute as-is and not to the expanded list of values
 - Do not use the shortest serialization principle, serialize using the expanded list of values instead of shortcuts
 - Never add a new shortcut which has some values in common with another shortcut but some values are different (i.e. non-disjoint sets which are not subsets one of the other).

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5506#issuecomment-692724381 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 15 September 2020 13:44:36 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:16 UTC