Re: [csswg-drafts] [css-scoping] Handling global name-defining constructs in shadow trees

Alternate argument in favor of the integer: it means the value is locally interpretable at all times.  If we make the bare keyword (like `font-family: foo;`) always refer to the global scope, and require using `scoped()` to refer to a local one, then we can just have a special inheritance rule, where when a `scoped()` value inherits past a shadow boundary, its integer automatically increments.  This maintains the "el.style.foo = getComputedStyle(el).foo is a no-op" invariant, and means we don't necessarily have to track a JS object in the internal value, just an integer.

Common usage will still be limited to just `foo` and `scoped(foo)`, and we can even warn authors to not use `scoped(foo, N)` as it's fragile, but it would be supported for back-end reasons.

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

Received on Friday, 17 November 2017 23:51:28 UTC