W3C home > Mailing lists > Public > www-style@w3.org > November 2011

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

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Sat, 19 Nov 2011 02:11:49 +0100
Message-ID: <4EC70255.8060809@disruptive-innovations.com>
To: whatwg@lists.whatwg.org
CC: "www-style@w3.org" <www-style@w3.org>
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 ?

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

(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
  opinion)

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.

</Daniel>
Received on Saturday, 19 November 2011 01:12:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:46 GMT