Re: [css-houdini-drafts] [css-properties-values-api] Interaction with setProperty is unfortunate. (#880)

I don't get the "give feedback to the author" point with `setProperty`. `setProperty` doesn't throw, so you need to call `getProperty` afterwards to check if it actually applied, it's not as different as having to call `getComputedStyle` afterwards, IMO. Also, UAs have console warnings. Firefox can give warnings for invalid property values coming from setProperty to the console, there's no reason Chrome couldn't do the same for registered custom properties.

I think I like 1 and 3 the most of those options, maybe with an special-case for the two-argument CSS.supports function so that you can actually check a string syntax against a custom property?

The fourth one looks pretty hard to define. Does toggling `src` or such count as a "JS-triggered parse"?

The last one at least is definitely a no-go. Parsing time depends on the network, and if you parse off-main-thread, you can concurrently register a property while you're parsing. Getting some kind of determinism there is really hard.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/880#issuecomment-487715647 using your GitHub account

Received on Monday, 29 April 2019 19:40:35 UTC