W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2021

Re: [csswg-drafts] [cssom] Parsing value should not be seen as side effects free (#6451)

From: Guillaume via GitHub <sysbot+gh@w3.org>
Date: Thu, 15 Jul 2021 11:04:35 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-880604190-1626347073-sysbot+gh@w3.org>
I might not explaining myself well, sorry. I know shorthands don't have a declaration.

Step 1 of `parse CSS value` tokenize the input value and consume tokens into a list of component values, and step 4 returns this list. Step 2 *match* this list. My question is wether it should return a boolean, or if it can mutate or replace the list of component values returned in step 4. For example, can it replace a list with a singe component value `none` by a list with component values `0`, `0,` and `auto` when `flex` is set to `none`?

I believe this is what Chrome does for long properties, eg. [`aspect-ratio`](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc;l=395), and that it [sets longhands in an object available to the parsing scope](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/css/properties/shorthands/shorthands_custom.cc;l=910) in order to use it in the above quoted step 8 of `setProperty`. Does this implementation is strictly spec compliant?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 15 July 2021 11:04:36 UTC

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