Permalink
Browse files

[] (0) Disallow scoped <style> in <head> and non-scoped <style> outsi…

…de <head>.

git-svn-id: http://svn.whatwg.org/webapps@938 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent a90407d commit 7986833f1e4fb0d010dadba0a0f234917c7df863 @Hixie Hixie committed Jun 20, 2007
Showing with 34 additions and 6 deletions.
  1. +21 −4 index
  2. +13 −2 source
View
@@ -7681,11 +7681,14 @@ class="main"> or <div class="content">. Why do we also need a body?
<dl class=element>
<dt>Contexts in which this element may be used:
- <dd>In a <code><a href="#head">head</a></code> element.
+ <dd>If the <code title=attr-style-scoped><a href="#scoped"></a></code> is
+ absent: in a <code><a href="#head">head</a></code> element.
- <dd>At the start of <code><a href="#article">article</a></code>, <code><a
- href="#aside">aside</a></code>, <code><a href="#div">div</a></code>, and
- <code><a href="#section">section</a></code> elements.
+ <dd>If the <code title=attr-style-scoped><a href="#scoped"></a></code> is
+ present: at the start of <code><a href="#article">article</a></code>,
+ <code><a href="#aside">aside</a></code>, <code><a
+ href="#div">div</a></code>, and <code><a
+ href="#section">section</a></code> elements.
<dt>Content model:
@@ -7754,6 +7757,20 @@ class="main"> or <div class="content">. Why do we also need a body?
parent element (if any), and that element's child nodes. Otherwise, the
specified styles must, if applied, be applied to the entire document.
+ <p>If the <code title=attr-style-scoped><a href="#scoped">scoped</a></code>
+ attribute is not specified, the <code><a href="#style">style</a></code>
+ element must be the child of a <code><a href="#head">head</a></code>
+ element.
+
+ <p>If the <code title=attr-style-scoped><a href="#scoped">scoped</a></code>
+ attribute <em>is</em> specified, then the <code><a
+ href="#style">style</a></code> element must be the child of an <code><a
+ href="#article">article</a></code>, <code><a
+ href="#aside">aside</a></code>, <code><a href="#div">div</a></code>, or
+ <code><a href="#section">section</a></code> element, before any <a
+ href="#significant0">significant text</a> or any elements other than
+ <code><a href="#style">style</a></code> elements.
+
<p id=title-on-style>The <dfn id=title3
title=attr-style-title><code>title</code></dfn> attribute on <code><a
href="#style">style</a></code> elements defines <a
View
@@ -6291,8 +6291,8 @@ class="main"> or <div class="content">. Why do we also need a body?
<dl class="element">
<dt>Contexts in which this element may be used:</dt>
- <dd>In a <code>head</code> element.</dd>
- <dd>At the start of <code>article</code>, <code>aside</code>, <code>div</code>, and <code>section</code> elements.</dd>
+ <dd>If the <code title="attr-style-scoped">scoped</code> attribute is absent: in a <code>head</code> element.</dd>
+ <dd>If the <code title="attr-style-scoped">scoped</code> attribute is present: at the start of <code>article</code>, <code>aside</code>, <code>div</code>, and <code>section</code> elements.</dd>
<dt>Content model:</dt>
<dd>Depends on the value of the <code title="attr-style-type">type</code> attribute.</dd>
<dt>Element-specific attributes:</dt>
@@ -6349,6 +6349,17 @@ class="main"> or <div class="content">. Why do we also need a body?
any), and that element's child nodes. Otherwise, the specified
styles must, if applied, be applied to the entire document.</p>
+ <p>If the <code title="attr-style-scoped">scoped</code> attribute is not specified,
+ the <code>style</code> element must be the child of a
+ <code>head</code> element.</p>
+
+ <p>If the <code title="attr-style-scoped">scoped</code> attribute
+ <em>is</em> specified, then the <code>style</code> element must be
+ the child of an <code>article</code>, <code>aside</code>,
+ <code>div</code>, or <code>section</code> element, before any
+ <span>significant text</span> or any elements other than
+ <code>style</code> elements.</dd>
+
<p id="title-on-style">The <dfn
title="attr-style-title"><code>title</code></dfn> attribute on
<code>style</code> elements defines <span>alternative style sheet

0 comments on commit 7986833

Please sign in to comment.