Skip to content

Commit 5555afd

Browse files
committed
[css-pseudo] remove ordinal and column from OM, add selection
1 parent 0ef829e commit 5555afd

File tree

2 files changed

+73
-105
lines changed

2 files changed

+73
-105
lines changed

css-pseudo/Overview.bs

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,10 @@ Styling Highlighted Ranges</h3>
486486
Only color and bgcolor seem supported; but text-decoration is needed for spellcheck.
487487

488488
If 'color' is not specified, the text's actual color must be used for the highlight.
489-
<span class="issue">Can we reuse ''currentColor'' for this, now that it computes to itself?</span>
490489
(As usual, the initial 'background-color' is ''transparent''.)
491490

491+
Issue: Can we reuse ''currentColor'' for this, now that it computes to itself?
492+
492493
The UA should use the OS-default selection color
493494
when neither 'color' nor 'background-color' has been specified by the author.
494495

@@ -645,50 +646,36 @@ Interface CSSPseudoElement</h3>
645646

646647
<pre class="idl">
647648
interface CSSPseudoElement {
648-
readonly attribute unsigned long <a href="#dom-csspseudochild-ordinal">ordinal</a>;
649-
// the ordinal of a column is its index
650649
readonly attribute DOMString <a href="#dom-csspseudochild-type">type</a>;
651650
readonly attribute <a href="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration">CSSStyleDeclaration</a> <a href="#dom-csspseudochild-style">style</a>;
652651
};
653652

654653
CSSPseudoElement implements EventTarget;
655654
</pre>
656655

657-
The <dfn id="dom-csspseudochild-ordinal">ordinal</dfn> attribute
658-
represents the ordinal of the pseudo-element for the object's type.
659-
It is a strictly positive integer.
660-
The value <code>1</code> for the <code>before</code>&nbsp;
661-
(or <code>after</code>, <code>letter</code> and <code>line</code>)
662-
types represents the ''::before'' (or ''::after'',
663-
''::first-letter'' and ''::first-line'')
664-
pseudo-elements.
665656
The <dfn id="dom-csspseudochild-type">type</dfn> attribute
666657
is a string representing the type of the pseudo-element.
667658
This can be one of the following values:
668659

669660
<dl>
670661
<dt>‘before’
671-
<dd>The pseudo-element was created before the element's contents
662+
<dd>The pseudo-element was created before the element's contents.
672663
<dt>‘after’
673-
<dd>The pseudo-element was created after the element's contents
664+
<dd>The pseudo-element was created after the element's contents.
674665
<dt>‘letter’
675-
<dd>The pseudo-element is the first letter of the element;
676-
the only valid ordinal is 1.
666+
<dd>The pseudo-element is the first letter of the element.
677667
<dt>‘line’
678-
<dd>The pseudo-element is the first line of the element;
679-
the only valid ordinal is 1.
680-
<dt>‘column’
681-
<dd>The pseudo-element is a column created by the element through
682-
the CSS Multi-column Layout Module.
683-
In that case its <code>ordinal</code> is
684-
the index of column in the collection of columns created by the element.
668+
<dd>The pseudo-element is the first line of the element.
669+
<dt>‘selection’
670+
<dd>The selection pseudo-element for the element.
685671
</dl>
686672

687673
The <dfn id="dom-csspseudochild-style">style</dfn> attribute
688674
is a <code>CSSStyleDeclaration</code> [[!CSSOM]]
689675
that allows directly setting style information (inline styles) onto the pseudo-element.
690676
Inline styles on a <code>CSSPseudoElement</code> have precedence over all
691677
style rules styling that pseudo-element.
678+
692679
Issue: This should cascade like actual inline styles, not be a different thing.
693680

694681
The <a href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget"><code>EventTarget</code></a> interface [[!DOM-LEVEL-2-EVENTS]]
@@ -705,10 +692,9 @@ Interface CSSPseudoElementList</h3>
705692
interface CSSPseudoElementList {
706693
readonly attribute unsigned long <a href="#dom-csspseudochildlist-length">length</a>;
707694
CSSPseudoElement <a href="#dom-csspseudochildlist-item">item</a>(unsigned long index);
708-
CSSPseudoElement <a href="#dom-csspseudochildlist-getbyordinalandtype">getByOrdinalAndType</a>(unsigned long ordinal,
709-
DOMString type);
710-
// replies null if no pseudo-element does not exist for
711-
// the requested ordinal and type
695+
CSSPseudoElement <a href="#dom-csspseudochildlist-getbytype">getByType</a>(DOMString type);
696+
// replies null if no pseudo-element exists for
697+
// the requested type
712698
};
713699
</pre>
714700

@@ -721,14 +707,14 @@ Interface CSSPseudoElementList</h3>
721707
Its return value is the <code>CSSPseudo</code><code>Element</code>
722708
at the requested index in the collection
723709
or null if that is not a valid index.
724-
The method <dfn id="dom-csspseudochildlist-getbyordinalandtype">getByOrdinalAndType()</dfn>
710+
711+
The method <dfn id="dom-csspseudochildlist-getbytype">getByType()</dfn>
725712
is used to retrieve a <code>CSSPseudo</code><code>Element</code>
726-
by its ordinal and type.
727-
It takes two parameters: first, the requested ordinal; second a type.
713+
by its type.
728714
Its return value is the <code>CSSPseudo</code><code>Element</code>
729-
at the requested index in the collection
715+
in the collection that matches the type
730716
or null if there is no <code>CSSPseudo</code><code>Element</code>
731-
in the collection for that index and type.
717+
in the collection for that type.
732718

733719
<h3 id="window-interface">
734720
Addition to the <code>window</code> interface</h3>

0 commit comments

Comments
 (0)