W3C home > Mailing lists > Public > www-style@w3.org > February 2014

[shadow-styling] Scoping at-rules like @font-face in scoped styled and shadow trees?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 13 Feb 2014 12:42:03 -0800
Message-ID: <CAAWBYDA572koozVYs_7Ktz6w2W4DFAsyppnQmV8kwqTYinzq6A@mail.gmail.com>
To: www-style list <www-style@w3.org>
We've never really decided how name-creating at-rules, like @font-face
or @counter-style, behave in a scoped style sheet.  Shadow trees
present an identical problem.  We should nail this down now.

I see a few options:

1. They craete their name globally (no scoping effect at all).
2. They create their name only within the scope.
3. They don't create any names..
4. They don't create any names by default, but when nested in an
@global rule, they create their name globally.

Any other options?  What do people think is the best answer?

I think we can rule out #3 immediately, by the way.  Early experience
with Shadow DOM shows that people want to use @font-face with their
components, and it's annoying to force pages to include a separate
<link> just for a stylesheet with @font-face rules in it; it's much
better to put the @font-face in the component's styles with everything
else.

I think #2 is fairly obviously the "best" answer, but it's hard to implement.

~TJ
Received on Thursday, 13 February 2014 20:42:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC