W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2017

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 17 Nov 2017 23:18:56 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-345391758-1510960735-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Friday, 17 November 2017 23:19:02 UTC