Skip to content

Commit aff0852

Browse files
committed
Add the CSSOM interface.
1 parent ea83b19 commit aff0852

2 files changed

Lines changed: 69 additions & 17 deletions

File tree

css3-hierarchies/Overview.html

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
}
2929
</style>
3030

31+
<style>
32+
pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em }
33+
pre.idl :link, pre.idl :visited { color:inherit; background:transparent }
34+
</style>
35+
3136
<body>
3237
<div class=head> <!--begin-logo-->
3338
<p><a href="http://www.w3.org/"><img alt=W3C height=48
@@ -177,24 +182,27 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
177182
Selectors 4 Lexical Scanner</a>
178183
</ul>
179184

180-
<li><a href="#conformance"><span class=secno>4. </span> Conformance</a>
185+
<li><a href="#cssom"><span class=secno>4. </span> CSS Object Model
186+
Modifications</a>
187+
188+
<li><a href="#conformance"><span class=secno>5. </span> Conformance</a>
181189
<ul class=toc>
182-
<li><a href="#conventions"><span class=secno>4.1. </span> Document
190+
<li><a href="#conventions"><span class=secno>5.1. </span> Document
183191
Conventions</a>
184192

185-
<li><a href="#conformance-classes"><span class=secno>4.2. </span>
193+
<li><a href="#conformance-classes"><span class=secno>5.2. </span>
186194
Conformance Classes</a>
187195

188-
<li><a href="#partial"><span class=secno>4.3. </span> Partial
196+
<li><a href="#partial"><span class=secno>5.3. </span> Partial
189197
Implementations</a>
190198

191-
<li><a href="#experimental"><span class=secno>4.4. </span> Experimental
199+
<li><a href="#experimental"><span class=secno>5.4. </span> Experimental
192200
Implementations</a>
193201

194-
<li><a href="#testing"><span class=secno>4.5. </span>Non-Experimental
202+
<li><a href="#testing"><span class=secno>5.5. </span>Non-Experimental
195203
Implementations</a>
196204

197-
<li><a href="#cr-exit-criteria"><span class=secno>4.6. </span> CR Exit
205+
<li><a href="#cr-exit-criteria"><span class=secno>5.6. </span> CR Exit
198206
Criteria</a>
199207
</ul>
200208

@@ -404,9 +412,26 @@ <h3 id=selectors4-lexical-scanner><span class=secno>3.3. </span> Selectors
404412

405413
<pre>"&" return NEST;</pre>
406414

407-
<h2 id=conformance><span class=secno>4. </span> Conformance</h2>
415+
<h2 id=cssom><span class=secno>4. </span> CSS Object Model Modifications</h2>
416+
417+
<p>The following attribute is required to be added to the CSSStyleRule
418+
object defined in Section 6.4.3 of <a href="#CSSOM"
419+
rel=biblioentry>[CSSOM]<!--{{!CSSOM}}--></a>:
420+
421+
<pre class=idl>
422+
interface CSSStyleRule : CSSRule {
423+
attribute DOMString selectorText;
424+
<ins>readonly attribute CSSRuleList cssRules;</ins>
425+
readonly attribute CSSStyleDeclaration style;
426+
};</pre>
427+
428+
<p>The <code>cssRules</code> attribute must return a
429+
<code>CSSRuleList</code> object for the list of CSS rules specified within
430+
the style rule.
408431

409-
<h3 id=conventions><span class=secno>4.1. </span> Document Conventions</h3>
432+
<h2 id=conformance><span class=secno>5. </span> Conformance</h2>
433+
434+
<h3 id=conventions><span class=secno>5.1. </span> Document Conventions</h3>
410435

411436
<p>Conformance requirements are expressed with a combination of descriptive
412437
assertions and RFC 2119 terminology. The key words “MUST”, “MUST
@@ -433,7 +458,7 @@ <h3 id=conventions><span class=secno>4.1. </span> Document Conventions</h3>
433458

434459
<p class=note>Note, this is an informative note.
435460

436-
<h3 id=conformance-classes><span class=secno>4.2. </span> Conformance
461+
<h3 id=conformance-classes><span class=secno>5.2. </span> Conformance
437462
Classes</h3>
438463

439464
<p>Conformance to <var class=replaceme>CSS TEMPLATE Module</var> is defined
@@ -479,7 +504,7 @@ <h3 id=conformance-classes><span class=secno>4.2. </span> Conformance
479504
feature in this module, and meet all other conformance requirements of
480505
style sheets as described in this module.
481506

482-
<h3 id=partial><span class=secno>4.3. </span> Partial Implementations</h3>
507+
<h3 id=partial><span class=secno>5.3. </span> Partial Implementations</h3>
483508

484509
<p>So that authors can exploit the forward-compatible parsing rules to
485510
assign fallback values, CSS renderers <strong>must</strong> treat as
@@ -493,7 +518,7 @@ <h3 id=partial><span class=secno>4.3. </span> Partial Implementations</h3>
493518
unsupported values must be), CSS requires that the entire declaration be
494519
ignored.
495520

496-
<h3 id=experimental><span class=secno>4.4. </span> Experimental
521+
<h3 id=experimental><span class=secno>5.4. </span> Experimental
497522
Implementations</h3>
498523

499524
<p>To avoid clashes with future CSS features, the CSS2.1 specification
@@ -507,7 +532,7 @@ <h3 id=experimental><span class=secno>4.4. </span> Experimental
507532
vendor-prefixed syntax for such features, including those in W3C Working
508533
Drafts. This avoids incompatibilities with future changes in the draft.
509534

510-
<h3 id=testing><span class=secno>4.5. </span>Non-Experimental
535+
<h3 id=testing><span class=secno>5.5. </span>Non-Experimental
511536
Implementations</h3>
512537

513538
<p>Once a specification reaches the Candidate Recommendation stage,
@@ -529,7 +554,7 @@ <h3 id=testing><span class=secno>4.5. </span>Non-Experimental
529554
href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
530555
mailing list.
531556

532-
<h3 id=cr-exit-criteria><span class=secno>4.6. </span> CR Exit Criteria</h3>
557+
<h3 id=cr-exit-criteria><span class=secno>5.6. </span> CR Exit Criteria</h3>
533558

534559
<p class=issue>[Change or remove the following CR exit criteria if the spec
535560
is not a module, but, e.g., a Note or a profile. This text was <a
@@ -606,6 +631,15 @@ <h3 class=no-num id=normative-references>Normative references</h3>
606631
</dd>
607632
<!---->
608633

634+
<dt id=CSSOM>[CSSOM]
635+
636+
<dd>Anne van Kesteren. <a
637+
href="http://www.w3.org/TR/2011/WD-cssom-20110712/"><cite>CSSOM.</cite></a>
638+
12 July 2011. W3C Working Draft. (Work in progress.) URL: <a
639+
href="http://www.w3.org/TR/2011/WD-cssom-20110712/">http://www.w3.org/TR/2011/WD-cssom-20110712/</a>
640+
</dd>
641+
<!---->
642+
609643
<dt id=RFC2119>[RFC2119]
610644

611645
<dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
@@ -651,15 +685,15 @@ <h2 class=no-num id=index>Index</h2>
651685

652686
<ul class=indexlist>
653687
<li>authoring tool, <a href="#authoring-tool"
654-
title="authoring tool"><strong>4.2.</strong></a>
688+
title="authoring tool"><strong>5.2.</strong></a>
655689

656-
<li>renderer, <a href="#renderer" title=renderer><strong>4.2.</strong></a>
690+
<li>renderer, <a href="#renderer" title=renderer><strong>5.2.</strong></a>
657691

658692

659693
<li>style sheet
660694
<ul>
661695
<li>as conformance class, <a href="#style-sheet"
662-
title="style sheet, as conformance class"><strong>4.2.</strong></a>
696+
title="style sheet, as conformance class"><strong>5.2.</strong></a>
663697
</ul>
664698
</ul>
665699
<!--end-index-->

css3-hierarchies/Overview.src.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
color: black;
2424
}
2525
</style>
26+
<style>
27+
pre.idl { border:solid thin; background:#eee; color:#000; padding:0.5em }
28+
pre.idl :link, pre.idl :visited { color:inherit; background:transparent }
29+
</style>
2630
</head>
2731

2832
<body><div class="head">
@@ -258,6 +262,20 @@ <h3 id="selectors4-lexical-scanner">
258262

259263
<pre>"&" return NEST;</pre>
260264

265+
<h2 id="cssom">
266+
CSS Object Model Modifications</h2>
267+
268+
<p>The following attribute is required to be added to the CSSStyleRule object defined in Section 6.4.3 of [[!CSSOM]]:</p>
269+
270+
<pre class='idl'>
271+
interface CSSStyleRule : CSSRule {
272+
attribute DOMString selectorText;
273+
<ins>readonly attribute CSSRuleList cssRules;</ins>
274+
readonly attribute CSSStyleDeclaration style;
275+
};</pre>
276+
277+
<p>The <code>cssRules</code> attribute must return a <code>CSSRuleList</code> object for the list of CSS rules specified within the style rule.</p>
278+
261279
<h2 id="conformance">
262280
Conformance</h2>
263281

0 commit comments

Comments
 (0)