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

> A possible compromise, then: could we agree on having TypedOM values be a special object that tracks the defining scope when relevant, and leave serialization alone? So when you get a CSSFontFamilyValue or whatever, it'll have both a `.name` and a `.scope` (or `.source`? other names?) property, with the latter being the appropriate Document or ShadowRoot object. Then we wouldn't introduce the `scoped()` function; interacting with values inherited across shadows via string-OM will just be possibly dangerous in rare situations.

Yeah, solving this in TypedOM seems totally reasonable. Then web developers would get the best of both worlds. Basic string based referencing works as expected, and if you were trying to write some kind of authoring tool, etc... you can use TypedOM to get all the information you need to apply styles.

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

Received on Saturday, 20 April 2019 04:40:58 UTC