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:51:27 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-345396571-1510962685-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Friday, 17 November 2017 23:51:31 UTC