[whatwg] @font-face rules in <style scoped>

Daniel Glazman daniel.glazman at disruptive-innovations.com
Fri Nov 18 17:11:49 PST 2011

Le 18/11/11 23:40, Ian Hickson a écrit :

> I'm happy to add clarifying text or an example to the spec if that would
> help.

[cc to www-style, reply-to to www-style ]

Wow, wow, wow. Slowly please.

I think you should discuss that in www-style before any addition to
html. The complete mechanism for handling scoped stylesheets will impact
us strongly.

In particular, the scoping of at-rules has NEVER ever been
discussed with the CSS WG. If scoping @media would not be a problem
in most cases, scoping @font-face could be an issue for rendering
engines unable to maintain more than a document-wide list of font
matchings at this time, ie the current state of CSS. I don't even
want to discuss scoping CSS Variables at this time... How can
we access the list of stylesheets - including scoped ones - affecting
a given element? How is "scoped" reflected in the CSS OM? Are scoped
stylesheets visible from document.styleSheets?

What's the precise mechanism for the resolution of styles ? Does
a scoped style "override" a global one that is set "deeper" in
the subtree ?

     <style scoped="true">p { color: black }</style>
       <style>p { color: red }</style>
       <p>black or red?</p>

(I've always said that scoping should imply a specificity increased
  by an ID selector's specificity, and that's why I still think the
  p above should be black ; I know others have expressed a different

Seen from the CSS WG, the way the scoped attribute works is totally
undefined and the four little paragraphs contained in the html spec
are helpless. I don't think this is "ready for implementations"
as annotated in your spec; it's vastly underspecified.


More information about the whatwg mailing list