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

Ojan privately points out that it's very likely the integer is over-engineering, and virtually every case will just be wanting the nearest-local or the global version of a name.  You still need the ability for a value to refer to an arbitrary scope for inheritance to work properly, but you don't actually need to be able to *specify* that reference - in other words, we don't really need *syntax* for such a thing.

This simplifies it considerably. We can just define that the keyword always refers to the globally-defined name, and have `scoped(foo)` refer to the local name (name tbd, of course).  Internally, the value will still be stored as a (name, scope) tuple, but in some cases, from some stylesheets, you won't be able to write down a value that actually refers to the specified name.  The TypedOM will be completely correct, however - it can still have a `CSSScopedKeywordValue` with a `.scope` property that refers to a particular TreeScope, and you can construct that explicitly if you need to refer to a particular scope's name. You just won't be able to, in some cases, reproduce the effects of a style via an explicit property set in a stylesheet or the string-OM.

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

Received on Friday, 17 November 2017 23:18:58 UTC