Skip to content

Commit f4fb145

Browse files
committed
DocumentCSS begone for now; need a better specification first; if we ever add it back that is
1 parent f150645 commit f4fb145

2 files changed

Lines changed: 80 additions & 203 deletions

File tree

cssom/Overview.html

Lines changed: 41 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,11 @@ <h2 class="no-num no-toc" id=toc>Table of Contents</h2>
218218
<li><a href="#accessing0"><span class=secno>4.5. </span>Accessing
219219
declaration blocks</a>
220220
<ul class=toc>
221-
<li><a href="#introduction0"><span class=secno>4.5.1.
222-
</span>Introduction</a>
223-
224-
<li><a href="#the-elementcssinlinestyle"><span class=secno>4.5.2.
221+
<li><a href="#the-elementcssinlinestyle"><span class=secno>4.5.1.
225222
</span>The <code>ElementCSSInlineStyle</code> Interface</a>
226223

227-
<li><a href="#the-viewcss"><span class=secno>4.5.3. </span>The <code
224+
<li><a href="#the-viewcss"><span class=secno>4.5.2. </span>The <code
228225
title="">ViewCSS</code> Interface</a>
229-
230-
<li><a href="#the-documentcss"><span class=secno>4.5.4. </span>The
231-
<code title="">DocumentCSS</code> Interface</a>
232226
</ul>
233227

234228
<li><a href="#css-declaration-blocks"><span class=secno>4.6. </span>CSS
@@ -505,7 +499,26 @@ <h3 id=media><span class=secno>3.2. </span>Media Queries</h3>
505499

506500
<p>creating a MediaList object?
507501

508-
<p>parsing and serializing ...
502+
<p>The <dfn id=parsing-media-query title="parsing media query">rules for
503+
parsing a media query</dfn> for a given string <var>s</var> are to follow
504+
the <span>rules for parsing a list of media queries</span> and return the
505+
first media query those rules return, or <i>null</i> if <i>null</i> is
506+
returned.
507+
508+
<p>The <dfn id=parsing-media-queries title="parsing media queries">rules
509+
for parsing a list of media queries</dfn> ...
510+
511+
<p>The <dfn id=serializing-media-query title="serializing media
512+
query">rules for serializing a media query</dfn>
513+
514+
<p>The <dfn id=serializing-media-queries title="serializing media
515+
queries">rules for serializing a list of media queries</dfn>
516+
517+
<p>The <dfn id=compare-media-queries title="compare media queries">rules
518+
for comparing media queries</dfn> <var>m1</var> and <var>m2</var> are to
519+
<a href="#serializing-media-query" title="serializing media
520+
query">serialize</a> them both and if they are equal return <i>true</i>
521+
and <i>false</i> otherwise.
509522

510523
<h4 id=the-medialist><span class=secno>3.2.1. </span>The <code><a
511524
href="#medialist">MediaList</a></code> Interface</h4>
@@ -540,11 +553,12 @@ <h4 id=the-medialist><span class=secno>3.2.1. </span>The <code><a
540553

541554
<p>The <dfn id=medialist-mediatext
542555
title=medialist-mediatext><code>mediaText</code></dfn> attribute, on
543-
getting, <em class=ct>must</em> return the results of <span>serializing a
544-
list of media queries</span>. On setting, the media queries currently in
545-
the collection <em class=ct>must</em> be replaced with the result of
546-
<span>parsing a list of media queries</span>.</p>
547-
<!-- XXX definitions -->
556+
getting, <em class=ct>must</em> return a <a
557+
href="#serializing-media-queries" title="serializing media
558+
queries">serialization of the media qeuries</a>. On setting, the media
559+
queries currently in the collection <em class=ct>must</em> be replaced
560+
with the result of <a href="#parsing-media-queries" title="parsing media
561+
queries">parsing a list of media queries</a>.
548562

549563
<p>The <dfn id=medialist-length
550564
title=medialist-length><code>length</code></dfn> attribute, on getting,
@@ -1618,7 +1632,8 @@ <h4 id=the-cssstylerule><span class=secno>4.4.2. </span>The <code
16181632
class=ct>must</em> be used as input for <a href="#selectors-parsing"
16191633
title="selectors parsing">parsing a group of selectors</a> and if that
16201634
returns a non-"null" value that is to be used as a selector for the CSS
1621-
statement.
1635+
statement. If it returns "null" setting <em class=ct>must not</em> have an
1636+
effect.
16221637

16231638
<p>The <dfn id=cssstylerule-style
16241639
title=cssstylerule-style><code>style</code></dfn> attribute <em
@@ -1643,7 +1658,7 @@ <h4 id=the-cssimportrule><span class=secno>4.4.3. </span>The <code
16431658
<pre
16441659
class=idl>interface <dfn id=cssimportrule>CSSImportRule</dfn> : <a href="#cssrule">CSSRule</a> {
16451660
readonly attribute DOMString <a href="#cssimportrule-href" title=cssimportrule-href>href</a>;
1646-
readonly attribute <a href="#medialist">MediaList</a> <a href="#cssimportrule-media" title=cssimportrule-media>media</a>;
1661+
[PutForwards=mediaText] readonly attribute <a href="#medialist">MediaList</a> <a href="#cssimportrule-media" title=cssimportrule-media>media</a>;
16471662
readonly attribute <a href="#cssstylesheet">CSSStyleSheet</a> <a href="#cssimportrule-stylesheet" title=cssimportrule-stylesheet>styleSheet</a>;
16481663
};</pre>
16491664

@@ -1687,7 +1702,7 @@ <h4 id=the-cssmediarule><span class=secno>4.4.4. </span>The <code
16871702

16881703
<pre
16891704
class=idl>interface <dfn id=cssmediarule>CSSMediaRule</dfn> : <a href="#cssrule">CSSRule</a> {
1690-
readonly attribute <a href="#medialist">MediaList</a> <a href="#cssmediarule-media" title=cssmediarule-media>media</a>;
1705+
[PutForwards=mediaText] readonly attribute <a href="#medialist">MediaList</a> <a href="#cssmediarule-media" title=cssmediarule-media>media</a>;
16911706
readonly attribute <a href="#cssrulelist">CSSRuleList</a> <a href="#cssmediarule-cssrules" title=cssmediarule-cssrules>cssRules</a>;
16921707
unsigned long <a href="#cssmediarule-insertrule" title=cssmediarule-insertrule>insertRule</a>(in DOMString <var>rule</var>, in unsigned long <var>index</var>);
16931708
void <a href="#cssmediarule-deleterule" title=cssmediarule-deleterule>deleteRule</a>(in unsigned long <var>index</var>);
@@ -1776,7 +1791,8 @@ <h4 id=the-csspagerule><span class=secno>4.4.6. </span>The <code
17761791
value <em class=ct>must</em> be used as input for <a
17771792
href="#css-page-selectors-parsing" title="CSS page selectors
17781793
parsing">parsing CSS page selectors</a> and if that returns a non-"null"
1779-
value that is to be used as a selector for the <code>@page</code> rule.
1794+
value that is to be used as a selector for the <code>@page</code> rule. If
1795+
it returns "null" setting <em class=ct>must not</em> have an effect.
17801796

17811797
<p>The <dfn id=csspagerule-style
17821798
title=csspagerule-style><code>style</code></dfn> attribute, on getting,
@@ -1819,14 +1835,7 @@ <h4 id=the-cssnamespacerule><span class=secno>4.4.7. </span>The <code
18191835
<h3 id=accessing0><span class=secno>4.5. </span>Accessing declaration
18201836
blocks</h3>
18211837

1822-
<p>This section provides various way to get to declaration blocks which you
1823-
can then manipulate.
1824-
1825-
<h4 id=introduction0><span class=secno>4.5.1. </span>Introduction</h4>
1826-
1827-
<p class=issue>...
1828-
1829-
<h4 id=the-elementcssinlinestyle><span class=secno>4.5.2. </span>The
1838+
<h4 id=the-elementcssinlinestyle><span class=secno>4.5.1. </span>The
18301839
<code><a href="#elementcssinlinestyle">ElementCSSInlineStyle</a></code>
18311840
Interface</h4>
18321841

@@ -1841,26 +1850,20 @@ <h4 id=the-elementcssinlinestyle><span class=secno>4.5.2. </span>The
18411850

18421851
<p>The <dfn id=elementcssinlinestyle-currentstyle
18431852
title=elementcssinlinestyle-currentstyle><code>currentStyle</code></dfn>
1844-
attribute, when called, <em class=ct>must</em> return a <a
1845-
href="#readonly" title="readonly declaration">readonly
1846-
<code>CSSStyleDeclaration</code></a> object which represents the computed
1847-
style for the element on which it was called.
1853+
attribute, on getting, <em class=ct>must</em> return a <a href="#readonly"
1854+
title="readonly declaration">readonly <code>CSSStyleDeclaration</code></a>
1855+
object which represents the computed style for the element on which it was
1856+
called.
18481857

18491858
<p class=issue>Serialization of the <code>style</code> attribute is not
18501859
guaranteed to work.
18511860

1852-
<h4 id=the-viewcss><span class=secno>4.5.3. </span>The <code
1861+
<h4 id=the-viewcss><span class=secno>4.5.2. </span>The <code
18531862
title="">ViewCSS</code> Interface</h4>
18541863

18551864
<p>Objects implementing the <code>Window</code> interface <em
18561865
class=ct>must</em> also implement the <code><a
1857-
href="#viewcss">ViewCSS</a></code> interface.</p>
1858-
<!-- XXX wtf!? -->
1859-
1860-
<p>Since a computed style is related to an <code>Element</code> node, if
1861-
this element is removed from the document, the associated <code><a
1862-
href="#cssstyledeclaration">CSSStyleDeclaration</a></code> is no longer
1863-
valid.
1866+
href="#viewcss">ViewCSS</a></code> interface.
18641867

18651868
<pre class=idl>interface <dfn id=viewcss>ViewCSS</dfn> {
18661869
<a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#viewcss-getcomputedstyle">getComputedStyle</a>(in Element <var title="">elt</var>);
@@ -1875,73 +1878,6 @@ <h4 id=the-viewcss><span class=secno>4.5.3. </span>The <code
18751878
empty string or omitted. Otherwise, for the pseudo-element <var
18761879
title="">pseudoElt</var> of <var title="">elt</var>. [CSS]
18771880

1878-
<p>If <var title="">pseudoElt</var> is not a recognized CSS pseudo-element
1879-
the invocation the method <em class=ct>must</em> return <span
1880-
class=issue>...</span>.
1881-
1882-
<h4 id=the-documentcss><span class=secno>4.5.4. </span>The <code
1883-
title="">DocumentCSS</code> Interface</h4>
1884-
1885-
<p class=issue><code>runtimeStyle</code> is way better than this feature.
1886-
1887-
<p>This interface represents a document with a CSS view.</p>
1888-
<!--
1889-
so this is how this all comes together:
1890-
1891-
UA style sheet
1892-
User style sheet
1893-
Author style sheet
1894-
Override ("temporary") style sheet
1895-
Author !important styles
1896-
Override !important styles
1897-
User !important styles
1898-
1899-
on getting you actually don't create an override style sheet you just read
1900-
the computed style of a certain property. this should be clear.
1901-
1902-
that's what runtimeStyle should do more or less. removeAttribute() allows
1903-
you to remove the current style... removeAttribute is such an ugly name
1904-
1905-
currentStyle works sort of like this
1906-
-->
1907-
1908-
<p>The <code><a
1909-
href="#documentcss-getoverridestyle">getOverrideStyle</a></code> method
1910-
provides a mechanism through which a DOM author could effect immediate
1911-
change to the style of an element without modifying the explicitly linked
1912-
style sheets of a document or the inline style of elements in the style
1913-
sheets. This style sheet comes after the author style sheet in the cascade
1914-
algorithm and is called override style sheet. The override style sheet
1915-
takes precedence over author style sheets. An <code>!important</code>
1916-
declaration in an author style sheet still takes precedence over a normal
1917-
declaration in an author style sheet. Override, author and user style
1918-
sheets may all contain <code>!important</code> declarations. User
1919-
<code>!important</code> rules take precedence over both override and
1920-
author <code>!important</code> rules, and override <code>!important</code>
1921-
rules take precedence over author <code>!important</code> rules.
1922-
1923-
<p>The expectation is that an instance of the <code><a
1924-
href="#documentcss">DocumentCSS</a></code> interface can be obtained by
1925-
using binding-specific casting methods on an instance of the
1926-
<code>Document</code> interface.
1927-
1928-
<pre
1929-
class=idl>interface <dfn id=documentcss>DocumentCSS</dfn> : <a href="#documentstyle">DocumentStyle</a> {
1930-
<a href="#cssstyledeclaration">CSSStyleDeclaration</a> <a href="#documentcss-getoverridestyle">getOverrideStyle</a>(in Element <var>elt</var>, in DOMString <var>pseudoElt</var>);
1931-
};</pre>
1932-
1933-
<p>The <dfn
1934-
id=documentcss-getoverridestyle><code>getOverrideStyle</code></dfn> method
1935-
<em class=ct>must</em> return the override style declaration for the
1936-
<code>Element</code> <var>elt</var> (when <var title="">pseudoElt</var> is
1937-
<code>null</code>) or for the pseudo-element <var>pseudoElt</var> of
1938-
<code>Element</code> <var title="">elt</var>.
1939-
1940-
<p>For language bindings that support optional arguments invoking <code><a
1941-
href="#documentcss-getoverridestyle">getOverrideStyle</a></code> without
1942-
the <var>pseudoElt</var> argument <em class=ct>must</em> be identical to
1943-
invoking the method with that argument being <code>null</code>.
1944-
19451881
<h3 id=css-declaration-blocks><span class=secno>4.6. </span>CSS Declaration
19461882
Blocks</h3>
19471883

0 commit comments

Comments
 (0)