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

Outside of intentional "clever hacks", no author, when writing a page that contains a `@font-face { font-family: foo; ...}` declaration, writes "font-family: foo" in a style block thinking "I definitely intend for this to refer to my font here in the light dom, but maybe change to a different font when the property inherits into a component, depending on what styles that component has, unbeknownst to me, set for itself!"

> that problem was always solved with a crosses fingers unique namespace.

Note that this is pretty much what this solution does; it bakes an implicit unique namespace into @font-face rules and 'font-family' declarations, based on what tree they were set in.

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

Received on Friday, 24 May 2019 14:45:37 UTC