Re: [css-houdini-drafts] [css-typed-om] Setting/registering is allowed to be order-dependent

Further clarification: per [Seattle 
resolution](https://log.csswg.org/irc.w3.org/houdini/2017-01-10/#e756301),
 when using a typed property *in a stylesheet*, setting to an invalid 
value doesn't trigger fallback.  That is:

```
<script>
CSS.registerProperty("--foo", {grammar: "<color>"});
</script>
<style>
div { --foo: red; }
div.foo {  --foo: hello; }
</style>
```

In here, the "--foo: hello" is *not* thrown out at parse-time; it's 
accepted, but because it's invalid, it gets treated as "--foo: 
unset;".

* This is an intentional break from "real" CSS properties, because the
 threat model is different (unpredictable browsers with varying 
support, vs known libraries with well-known support).  
* This *removes* the order-dependence between setting and registration
 when you're setting in a stylesheet, rather than thru the JS API.
* This makes typed custom properties less consistent with "real" CSS 
properties, but more consistent with *untyped* custom properties.

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

Received on Friday, 3 February 2017 19:38:19 UTC