W3C home > Mailing lists > Public > public-html-diffs@w3.org > October 2011

hixie: Nail down <style scoped> content model rules. If anyone has a better idea of how to do this, let me know. (whatwg r6642)

From: poot <cvsmail@w3.org>
Date: Wed, 05 Oct 2011 19:27:49 -0400
To: public-html-diffs@w3.org
Message-Id: <E1RBasP-0007hc-5p@jay.w3.org>
hixie: Nail down <style scoped> content model rules. If anyone has a
better idea of how to do this, let me know. (whatwg r6642)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5325&r2=1.5326&f=h
http://html5.org/tools/web-apps-tracker?from=6641&to=6642

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5325
retrieving revision 1.5326
diff -u -d -r1.5325 -r1.5326
--- Overview.html	5 Oct 2011 23:11:44 -0000	1.5325
+++ Overview.html	5 Oct 2011 23:27:35 -0000	1.5326
@@ -12246,7 +12246,7 @@
    <dt>Contexts in which this element can be used:</dt>
    <dd>If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is absent: where <a href="#metadata-content">metadata content</a> is expected.</dd>
    <dd>If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is absent: in a <code><a href="#the-noscript-element">noscript</a></code> element that is a child of a <code><a href="#the-head-element">head</a></code> element.</dd>
-   <dd>If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is present: where <a href="#flow-content">flow content</a> is expected, but before any other <a href="#flow-content">flow content</a> other than other <code><a href="#the-style-element">style</a></code> elements and <a href="#inter-element-whitespace">inter-element whitespace</a>.</dd>
+   <dd>If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is present: where <a href="#flow-content">flow content</a> is expected, but before any other <a href="#flow-content">flow content</a> other than <a href="#inter-element-whitespace">inter-element whitespace</a>, and not as the child of an element whose content model is <a href="#transparent">transparent</a>.</dd>
    <dt>Content model:</dt>
    <dd>Depends on the value of the <code title="attr-style-type"><a href="#attr-style-type">type</a></code> attribute, but must match requirements described in prose below.</dd>
    <dt>Content attributes:</dt>
@@ -12299,9 +12299,15 @@
   attribute is a <a href="#boolean-attribute">boolean attribute</a>. If present, it
   indicates that the styles are intended just for the subtree rooted
   at the <code><a href="#the-style-element">style</a></code> element's parent element, as opposed to
-  the whole <code><a href="#document">Document</a></code>. If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is present, the
-  <code><a href="#the-style-element">style</a></code> element must be the first element of <a href="#flow-content">flow
-  content</a> in its parent element, if any.<div class="impl">
+  the whole <code><a href="#document">Document</a></code>.<p>If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is
+  present and the element has a parent element, then the
+  <code><a href="#the-style-element">style</a></code> element must be the first node of <a href="#flow-content">flow
+  content</a> in its parent element other than <a href="#inter-element-whitespace">inter-element
+  whitespace</a>, and the parent element's content model must not
+  have a <a href="#transparent">transparent</a> component.<p class="note">This implies that only one scoped <code><a href="#the-style-element">style</a></code>
+  element is allowed at a time, and that such elements cannot be
+  children of, e.g., <code><a href="#the-a-element">a</a></code> or <code><a href="#the-ins-element">ins</a></code> elements, even
+  when those are used as <a href="#flow-content">flow content</a> containers.<div class="impl">
 
   <p>If the <code title="attr-style-scoped"><a href="#attr-style-scoped">scoped</a></code> attribute is
   present, then the user agent must apply the specified style
Received on Wednesday, 5 October 2011 23:27:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 5 October 2011 23:27:51 GMT