Skip to content
Permalink
Browse files

[e] (0) Update HTML to reference future CSS spec for scoped style she…

…ets. I'm leaving the @global stuff there for now, but removing the stuff about @font-face since that's controversial.

Affected topics: CSS, HTML

git-svn-id: http://svn.whatwg.org/webapps@8120 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Aug 1, 2013
1 parent 549ff49 commit 294dede99a3307e7bdfd7322d910f02de2c21b6e
Showing with 28 additions and 51 deletions.
  1. +9 −17 complete.html
  2. +9 −17 index
  3. +10 −17 source

<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 information only to the <code><a href=#the-style-element>style</a></code> element's parent element
(if any), and that element's descendants. Otherwise, the specified styles must, if applied, be
applied to the entire document.</p>

<!--ADD-TOPIC:CSS-->

<p>A style sheet declared by a <code><a href=#the-style-element>style</a></code> element that has a <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute and has a parent node that is an element is
<i>scoped</i>, with the <i>scoping element</i> being the <code><a href=#the-style-element>style</a></code> element's parent
element. <a href=#refsCSSSCOPED>[CSSSCOPED]</a></p>

<p class=critical>The following will eventually be moved to a CSS specification; it is specified
here only on an interim basis until an editor can be found to own this.</p>


<p>Simple selectors in scoped CSS resources that are not prefixed by an <code title="">@global</code> @-rule must only match the <code><a href=#the-style-element>style</a></code> element's parent element (if
any), and that element's descendants.</p>

<p>For scoped CSS resources, the effect of other @-rules must be scoped to either the scoped sheet
and its subresources or to the subtree rooted at the <code><a href=#the-style-element>style</a></code> element's parent (if any),
even if the @-rule in question would ordinarily apply to all style sheets that affect the
<code><a href=#document>Document</a></code>, or to all nodes in the <code><a href=#document>Document</a></code>. Any '@page' rules in scoped
CSS resources must be ignored.</p>

<p class=example>For example, an '@font-face' rule defined in a scoped style sheet would only
define the font for the purposes of elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree that refer to font family names
declared in '@font-face' rules in a scoped section, when those rules are inherited by nodes in the
scoped section, would end up referring to the fonts declared in that section.</p>
<!--REMOVE-TOPIC:CSS-->

<hr></div>
<dt id=refsCSSUI>[CSSUI]</dt>
<dd><cite><a href=http://dev.w3.org/csswg/css3-ui/>CSS3 Basic User Interface Module</a></cite>, T. &Ccedil;elik. W3C.</dd>

<!-- one day this reference will exist! then we can update this! -->
<dt id=refsCSSSCOPED>[CSSSCOPED]</dt>
<dd><cite>CSS Scoped Style Sheets</cite>, T. Atkins. Your Imagination.</dd>

<dt id=refsCSSVALUES>[CSSVALUES]</dt>
<dd><cite><a href=http://dev.w3.org/csswg/css3-values/>CSS3 Values and Units</a></cite>, H. Lie, T. Atkins, E. Etemad. W3C.</dd>

26 index

<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 information only to the <code><a href=#the-style-element>style</a></code> element's parent element
(if any), and that element's descendants. Otherwise, the specified styles must, if applied, be
applied to the entire document.</p>

<!--ADD-TOPIC:CSS-->

<p>A style sheet declared by a <code><a href=#the-style-element>style</a></code> element that has a <code title=attr-style-scoped><a href=#attr-style-scoped>scoped</a></code> attribute and has a parent node that is an element is
<i>scoped</i>, with the <i>scoping element</i> being the <code><a href=#the-style-element>style</a></code> element's parent
element. <a href=#refsCSSSCOPED>[CSSSCOPED]</a></p>

<p class=critical>The following will eventually be moved to a CSS specification; it is specified
here only on an interim basis until an editor can be found to own this.</p>


<p>Simple selectors in scoped CSS resources that are not prefixed by an <code title="">@global</code> @-rule must only match the <code><a href=#the-style-element>style</a></code> element's parent element (if
any), and that element's descendants.</p>

<p>For scoped CSS resources, the effect of other @-rules must be scoped to either the scoped sheet
and its subresources or to the subtree rooted at the <code><a href=#the-style-element>style</a></code> element's parent (if any),
even if the @-rule in question would ordinarily apply to all style sheets that affect the
<code><a href=#document>Document</a></code>, or to all nodes in the <code><a href=#document>Document</a></code>. Any '@page' rules in scoped
CSS resources must be ignored.</p>

<p class=example>For example, an '@font-face' rule defined in a scoped style sheet would only
define the font for the purposes of elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree that refer to font family names
declared in '@font-face' rules in a scoped section, when those rules are inherited by nodes in the
scoped section, would end up referring to the fonts declared in that section.</p>
<!--REMOVE-TOPIC:CSS-->

<hr></div>
<dt id=refsCSSUI>[CSSUI]</dt>
<dd><cite><a href=http://dev.w3.org/csswg/css3-ui/>CSS3 Basic User Interface Module</a></cite>, T. &Ccedil;elik. W3C.</dd>

<!-- one day this reference will exist! then we can update this! -->
<dt id=refsCSSSCOPED>[CSSSCOPED]</dt>
<dd><cite>CSS Scoped Style Sheets</cite>, T. Atkins. Your Imagination.</dd>

<dt id=refsCSSVALUES>[CSSVALUES]</dt>
<dd><cite><a href=http://dev.w3.org/csswg/css3-values/>CSS3 Values and Units</a></cite>, H. Lie, T. Atkins, E. Etemad. W3C.</dd>

27 source

<div class="impl">

<p>If the <code title="attr-style-scoped">scoped</code> attribute is present, then the user agent
must apply the specified style information only to the <code>style</code> element's parent element
(if any), and that element's descendants. Otherwise, the specified styles must, if applied, be
applied to the entire document.</p>

<!--ADD-TOPIC:CSS-->

<p>A style sheet declared by a <code>style</code> element that has a <code
title="attr-style-scoped">scoped</code> attribute and has a parent node that is an element is
<i>scoped</i>, with the <i>scoping element</i> being the <code>style</code> element's parent
element. <a href="#refsCSSSCOPED">[CSSSCOPED]</a></p>

<p class="critical">The following will eventually be moved to a CSS specification; it is specified
here only on an interim basis until an editor can be found to own this.</p>

<p>Simple selectors in scoped CSS resources that are not prefixed by an <code
title="">@global</code> @-rule must only match the <code>style</code> element's parent element (if
any), and that element's descendants.</p>

<p>For scoped CSS resources, the effect of other @-rules must be scoped to either the scoped sheet
and its subresources or to the subtree rooted at the <code>style</code> element's parent (if any),
even if the @-rule in question would ordinarily apply to all style sheets that affect the
<code>Document</code>, or to all nodes in the <code>Document</code>. Any '@page' rules in scoped
CSS resources must be ignored.</p>

<p class="example">For example, an '@font-face' rule defined in a scoped style sheet would only
define the font for the purposes of elements in the scoped section; the font would not be used for
elements outside the subtree. However, rules outside the subtree that refer to font family names
declared in '@font-face' rules in a scoped section, when those rules are inherited by nodes in the
scoped section, would end up referring to the fonts declared in that section.</p>
<!--REMOVE-TOPIC:CSS-->

<hr>
<dt id="refsCSSUI">[CSSUI]</dt>
<dd><cite><a href="http://dev.w3.org/csswg/css3-ui/">CSS3 Basic User Interface Module</a></cite>, T. &Ccedil;elik. W3C.</dd>

<!-- one day this reference will exist! then we can update this! -->
<dt id="refsCSSSCOPED">[CSSSCOPED]</dt>
<dd><cite>CSS Scoped Style Sheets</cite>, T. Atkins. Your Imagination.</dd>

<dt id="refsCSSVALUES">[CSSVALUES]</dt>
<dd><cite><a href="http://dev.w3.org/csswg/css3-values/">CSS3 Values and Units</a></cite>, H. Lie, T. Atkins, E. Etemad. W3C.</dd>

0 comments on commit 294dede

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