Skip to content

Commit 6790442

Browse files
committed
[css3-cascade] Move the handling of style attributes to being scope-based rather than origin-based, per list discussion.
1 parent 378e7a3 commit 6790442

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

css3-cascade/Overview.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,6 @@ <h3 id=cascade><span class=secno>4.2. </span> Cascading Declarations</h3>
481481
<li>Normal override declarations <a href="#DOM-LEVEL-2-STYLE"
482482
rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{!DOM-LEVEL-2-STYLE}}--></a>
483483

484-
<li>Inline style attributes <a href="#CSSSTYLEATTR"
485-
rel=biblioentry>[CSSSTYLEATTR]<!--{{!CSSSTYLEATTR}}--></a>
486-
487484
<li>Normal author declarations
488485

489486
<li>Normal user declarations
@@ -499,13 +496,17 @@ <h3 id=cascade><span class=secno>4.2. </span> Cascading Declarations</h3>
499496
<dd> If a declaration belongs to a ruleset with a <a
500497
href="http://www.w3.org/TR/selectors4/#scoping">scoped selector</a>, the
501498
element it is scoped to can affect the cascade. For the purpose of this
502-
step, all other declarations are considered to be scoped to the root
503-
element.
499+
step, declarations from style attributes <a href="#CSSSTYLEATTR"
500+
rel=biblioentry>[CSSSTYLEATTR]<!--{{!CSSSTYLEATTR}}--></a> are considered
501+
to be scoped to the element with the attribute, and all other
502+
declarations are considered to be scoped to the root element.
504503
<p> If the <a
505504
href="http://www.w3.org/TR/selectors4/#scoping-element">scoping
506505
elements</a> of two declarations have an ancestor/descendant
507506
relationship, the declaration whose scoping element is the descendant
508-
wins.
507+
wins. If one declaration is from a style attribute on an element and the
508+
other is from a ruleset scoped to that element, the declaration in the
509+
style attribute wins.
509510

510511
<dt>Specificity
511512

css3-cascade/Overview.src.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ <h3 id='cascade'>
300300
<li>Important author declarations
301301
<li>Animation declarations [[!CSS3-ANIMATIONS]]
302302
<li>Normal override declarations [[!DOM-LEVEL-2-STYLE]]
303-
<li>Inline style attributes [[!CSSSTYLEATTR]]
304303
<li>Normal author declarations
305304
<li>Normal user declarations
306305
<li>Normal user agent declarations
@@ -314,12 +313,15 @@ <h3 id='cascade'>
314313
If a declaration belongs to a ruleset with a <a href="http://www.w3.org/TR/selectors4/#scoping">scoped selector</a>,
315314
the element it is scoped to can affect the cascade.
316315
For the purpose of this step,
317-
all other declarations are considered to be scoped to the root element.
316+
declarations from style attributes [[!CSSSTYLEATTR]] are considered to be scoped to the element with the attribute,
317+
and all other declarations are considered to be scoped to the root element.
318318

319319
<p>
320320
If the <a href="http://www.w3.org/TR/selectors4/#scoping-element">scoping elements</a> of two declarations
321321
have an ancestor/descendant relationship,
322322
the declaration whose scoping element is the descendant wins.
323+
If one declaration is from a style attribute on an element and the other is from a ruleset scoped to that element,
324+
the declaration in the style attribute wins.
323325

324326
<dt>Specificity
325327
<dd>

0 commit comments

Comments
 (0)