Skip to content
Permalink
Browse files

[c] (2) Allow multiple <style scoped> blocks in a row

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 4bdd4c72d42b19c26aff846c4dd188787232ab2d
Showing with 18 additions and 15 deletions.
  1. +6 −5 complete.html
  2. +6 −5 index
  3. +6 −5 source
<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>
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
11 index
<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>
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
11 source
<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>
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

0 comments on commit 4bdd4c7

Please sign in to comment.
You can’t perform that action at this time.