Skip to content

Commit e66d8d0

Browse files
committed
[css-cascade] Make the Specificity section also handle style attributes properly. Also, whitespace edit.
1 parent 67c1140 commit e66d8d0

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

css-cascade/Overview.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
rel=dcterms.rights>
1111
<meta content="CSS Cascading and Inheritance Level 3" name=dcterms.title>
1212
<meta content=text name=dcterms.type>
13-
<meta content=2013-06-24 name=dcterms.date>
13+
<meta content=2013-06-25 name=dcterms.date>
1414
<meta content="Håkon Wium Lie" name=dcterms.creator>
1515
<meta content="Elika J. Etemad" name=dcterms.creator>
1616
<meta content="Tab Atkins Jr." name=dcterms.creator>
@@ -29,11 +29,11 @@
2929

3030
<h1>CSS Cascading and Inheritance Level 3</h1>
3131

32-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 24 June 2013</h2>
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 25 June 2013</h2>
3333

3434
<dl><!--
3535
<dt>This version:
36-
<dd><a href="http://dev.w3.org/csswg/css3-cascade/">http://www.w3.org/TR/2013/WD-css3-cascade-20130624/</a>
36+
<dd><a href="http://dev.w3.org/csswg/css3-cascade/">http://www.w3.org/TR/2013/WD-css3-cascade-20130625/</a>
3737
-->
3838

3939
<dt>Latest version:
@@ -608,12 +608,12 @@ <h3 id=cascade><span class=secno>4.2. </span> Cascading Declarations</h3>
608608
<dd> The <a href="http://www.w3.org/TR/selectors/#specificity">Selectors
609609
module</a> <a href="#SELECT"
610610
rel=biblioentry>[SELECT]<!--{{!SELECT}}--></a> describes how to compute
611-
the specificity of a selector. For the purpose of this step, a style rule
612-
without a selector (such as the <a
611+
the specificity of a selector. Each declaration has the same specificity
612+
as the style rule it appears in. For the purpose of this step,
613+
declarations that do not belong to a style rule (such as the <a
613614
href="http://www.w3.org/TR/css-style-attr/#interpret">contents of a style
614-
attribute</a>) is considered to have a specificity higher than any
615-
selector. The declaration belonging to a style rule whose selector has
616-
the highest specificity wins.
615+
attribute</a>) are considered to have a specificity higher than any
616+
selector. The declaration with the highest specificity wins.
617617

618618
<dt id=cascade-order>Order of appearance.
619619

css-cascade/Overview.src.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ <h3 id='cascade'>
382382
whereas important declarations from style attributes
383383
are considered to be <i>scoped</i> to the root element.
384384
[[!CSSSTYLEATTR]]
385+
385386
<p class="note">
386387
This odd handling of <code>!important</code> style attribute declarations
387388
is to match the behavior defined in CSS Levels 1 and 2,
@@ -390,11 +391,12 @@ <h3 id='cascade'>
390391
<dt id='cascade-specificity'>Specificity
391392
<dd>
392393
The <a href="http://www.w3.org/TR/selectors/#specificity">Selectors module</a> [[!SELECT]] describes how to compute the specificity of a selector.
393-
For the purpose of this step,
394-
a style rule without a selector
394+
Each declaration has the same specificity as the style rule it appears in.
395+
For the purpose of this step,
396+
declarations that do not belong to a style rule
395397
(such as the <a href="http://www.w3.org/TR/css-style-attr/#interpret">contents of a style attribute</a>)
396-
is considered to have a specificity higher than any selector.
397-
The declaration belonging to a style rule whose selector has the highest specificity wins.
398+
are considered to have a specificity higher than any selector.
399+
The declaration with the highest specificity wins.
398400

399401

400402
<dt id='cascade-order'>Order of appearance.

0 commit comments

Comments
 (0)