Skip to content

Commit

Permalink
[c] (2) Allow multiple <style scoped> blocks in a row
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22480
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8035 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 3, 2013
1 parent baa00f5 commit 4bdd4c7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
11 changes: 6 additions & 5 deletions complete.html
Expand Up @@ -13833,7 +13833,7 @@ <h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</co
<dt><a href=#element-dfn-contexts title=element-dfn-contexts>Contexts in which this element can be used</a>:</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 <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>
<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 <code><a href=#the-style-element>style</a></code> elements, and not as the child of an element whose content model is <a href=#transparent>transparent</a>.</dd>
<dt><a href=#element-dfn-content-model title=element-dfn-content-model>Content model</a>:</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><a href=#element-dfn-tag-omission title=element-dfn-tag-omission>Tag omission in text/html</a>:</dt>
Expand Down Expand Up @@ -13899,13 +13899,14 @@ <h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</co
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>.</p>

<!--CLEANUP-->
<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, then the <code><a href=#the-style-element>style</a></code> element must precede any <a href=#flow-content>flow
content</a> in its parent element other than <a href=#inter-element-whitespace>inter-element whitespace</a> and other <code><a href=#the-style-element>style</a></code> elements, and the
parent element's content model must not have a <a href=#transparent>transparent</a> component.</p>

<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,
<p class=note>This implies that scoped <code><a href=#the-style-element>style</a></code> 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.</p>

<p class=note>A <code><a href=#the-style-element>style</a></code> element <em>without</em> a <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is restricted to appearing in the
Expand Down
11 changes: 6 additions & 5 deletions index
Expand Up @@ -13833,7 +13833,7 @@ people expect to have work and what is necessary.
<dt><a href=#element-dfn-contexts title=element-dfn-contexts>Contexts in which this element can be used</a>:</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 <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>
<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 <code><a href=#the-style-element>style</a></code> elements, and not as the child of an element whose content model is <a href=#transparent>transparent</a>.</dd>
<dt><a href=#element-dfn-content-model title=element-dfn-content-model>Content model</a>:</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><a href=#element-dfn-tag-omission title=element-dfn-tag-omission>Tag omission in text/html</a>:</dt>
Expand Down Expand Up @@ -13899,13 +13899,14 @@ people expect to have work and what is necessary.
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>.</p>

<!--CLEANUP-->
<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, then the <code><a href=#the-style-element>style</a></code> element must precede any <a href=#flow-content>flow
content</a> in its parent element other than <a href=#inter-element-whitespace>inter-element whitespace</a> and other <code><a href=#the-style-element>style</a></code> elements, and the
parent element's content model must not have a <a href=#transparent>transparent</a> component.</p>

<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,
<p class=note>This implies that scoped <code><a href=#the-style-element>style</a></code> 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.</p>

<p class=note>A <code><a href=#the-style-element>style</a></code> element <em>without</em> a <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute is restricted to appearing in the
Expand Down
11 changes: 6 additions & 5 deletions source
Expand Up @@ -14272,7 +14272,7 @@ people expect to have work and what is necessary.
<dt><span title="element-dfn-contexts">Contexts in which this element can be used</span>:</dt>
<dd>If the <code title="attr-style-scoped">scoped</code> attribute is absent: where <span>metadata content</span> is expected.</dd>
<dd>If the <code title="attr-style-scoped">scoped</code> attribute is absent: in a <code>noscript</code> element that is a child of a <code>head</code> element.</dd>
<dd>If the <code title="attr-style-scoped">scoped</code> attribute is present: where <span>flow content</span> is expected, but before any other <span>flow content</span> other than <span>inter-element whitespace</span>, and not as the child of an element whose content model is <span>transparent</span>.</dd>
<dd>If the <code title="attr-style-scoped">scoped</code> attribute is present: where <span>flow content</span> is expected, but before any other <span>flow content</span> other than <span>inter-element whitespace</span> and <code>style</code> elements, and not as the child of an element whose content model is <span>transparent</span>.</dd>
<dt><span title="element-dfn-content-model">Content model</span>:</dt>
<dd>Depends on the value of the <code title="attr-style-type">type</code> attribute, but must match requirements described in prose below.</dd>
<dt><span title="element-dfn-attributes">Content attributes</span>:</dt>
Expand Down Expand Up @@ -14343,13 +14343,14 @@ people expect to have work and what is necessary.
rooted at the <code>style</code> element's parent element, as opposed to the whole
<code>Document</code>.</p>

<!--CLEANUP-->
<p>If the <code title="attr-style-scoped">scoped</code> attribute is present and the element has a
parent element, then the <code>style</code> element must be the first node of <span>flow
content</span> in its parent element other than <span>inter-element whitespace</span>, and the
parent element, then the <code>style</code> element must precede any <span>flow
content</span> in its parent element other than <span>inter-element whitespace</span> and other <code>style</code> elements, and the
parent element's content model must not have a <span>transparent</span> component.</p>

<p class="note">This implies that only one scoped <code>style</code> element is allowed at a time,
and that such elements cannot be children of, e.g., <code>a</code> or <code>ins</code> elements,
<p class="note">This implies that scoped <code>style</code> elements
cannot be children of, e.g., <code>a</code> or <code>ins</code> elements,
even when those are used as <span>flow content</span> containers.</p>

<p class="note">A <code>style</code> element <em>without</em> a <code
Expand Down

0 comments on commit 4bdd4c7

Please sign in to comment.