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

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

From: Guillaume via GitHub <sysbot+gh@w3.org>
Date: Wed, 14 Jul 2021 13:35:08 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-944436482-1626269706-sysbot+gh@w3.org>
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] Parsing value should not be seen as side effects free ==
I'm trying to implement `CSSStyleDeclaration` in JS. [Parse a CSS value](https://drafts.csswg.org/cssom/#parse-a-css-value) is invoked by `setProperty` (step 5) with the following steps:

> 1. Let list be the value returned by invoking parse a list of component values from value.
> 2. Match list against the grammar for the property property in the CSS specification.
> 3. If the above step failed, return null.
> 4. Return list.

How can `getPropertyValue('flex-grow')` return `0` after `setProperty(flex, 'none')` if step 2 doesn't mutate the list (or returns a new list)? If it seems too obvious to add a dedicated note below these steps, please forgive me. I could have posted the following issue on StackOverflow but based on my previous experiences with this kind of topic, I don't think anyone would have answered it.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6451 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 July 2021 13:35:10 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:46 UTC