Skip to content

Commit 651be84

Browse files
author
Simon Pieters
committed
[cssom] Say that ::before and ::after exist for all elements
1 parent 705d809 commit 651be84

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

cssom/Overview.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ <h2 id="terminology"><span class="secno">3 </span>Terminology</h2>
293293

294294
<p class="note">If another styling language becomes supported in user agents, this specification is expected to be updated as necessary.
295295

296+
<p>The terms <dfn id="x::before-pseudo-element">::before pseudo-element</dfn> and <dfn id="x::after-pseudo-element">::after pseudo-element</dfn> refer to the :before and :after pseudo-elements in CSS, except in this
297+
specification the pseudo-elements are assumed to exist for all elements even if no box is generated for them. <a href="#refsCSS">[CSS]</a>
298+
296299
<h3 id="common-serializing-idioms"><span class="secno">3.1 </span>Common Serializing Idioms</h3>
297300

298301
<p>To <dfn id="escape-a-character">escape a character</dfn> means to create a string of
@@ -2653,12 +2656,12 @@ <h3 id="extensions-to-the-window-interface"><span class="secno">7.2 </span>Exten
26532656
<li><p>If <var title="">pseudoElt</var> is as an
26542657
<a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for
26552658
either '<code title="">:before</code>' or '<code title="">::before</code>' let
2656-
<var title="">obj</var> be the '::before' pseudo-element of
2659+
<var title="">obj</var> be the <a href="#x::before-pseudo-element">::before pseudo-element</a> of
26572660
<var title="">elt</var>.</li>
26582661
<li><p>If <var title="">pseudoElt</var> is as an
26592662
<a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for
26602663
either '<code title="">:after</code>' or '<code title="">::after</code>' let
2661-
<var title="">obj</var> be the '::after' pseudo-element of
2664+
<var title="">obj</var> be the <a href="#x::after-pseudo-element">::after pseudo-element</a> of
26622665
<var title="">elt</var>.</li>
26632666
<li>
26642667
<p>Return a <a href="#css-declaration-block">CSS declaration block</a> with the
@@ -2741,11 +2744,11 @@ <h3 id="extensions-to-the-element-interface"><span class="secno">7.4 </span>Exte
27412744
<p>The <dfn id="dom-element-pseudo" title="dom-Element-pseudo"><code>pseudo(<var title="">pseudoElt</var>)</code></dfn> method, when invoked, must run the following steps:
27422745
<ol>
27432746
<li><p>If <var title="">pseudoElt</var> is as an <a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code title="">:before</code>' or
2744-
'<code title="">::before</code>' return the <code><a href="#pseudoelement">PseudoElement</a></code> representing the '::before' pseudo-element of the <a class="external" href="http://dom.spec.whatwg.org/#context-object">context
2745-
object</a>.</li>
2747+
'<code title="">::before</code>' return the <code><a href="#pseudoelement">PseudoElement</a></code> representing the <a href="#x::before-pseudo-element">::before pseudo-element</a> of the
2748+
<a class="external" href="http://dom.spec.whatwg.org/#context-object">context object</a>.</li>
27462749
<li><p>If <var title="">pseudoElt</var> is as an <a class="external" href="http://dom.spec.whatwg.org/#ascii-case-insensitive">ASCII case-insensitive</a> match for either '<code title="">:after</code>' or
2747-
'<code title="">::after</code>' return the <code><a href="#pseudoelement">PseudoElement</a></code> representing the '::after' pseudo-element of the <a class="external" href="http://dom.spec.whatwg.org/#context-object">context
2748-
object</a>.</li>
2750+
'<code title="">::after</code>' return the <code><a href="#pseudoelement">PseudoElement</a></code> representing the <a href="#x::after-pseudo-element">::after pseudo-element</a> of the
2751+
<a class="external" href="http://dom.spec.whatwg.org/#context-object">context object</a>.</li>
27492752
<li><p>Return null.</li>
27502753
</ol>
27512754
<p>When invoked with an argument that returns a <code><a href="#pseudoelement">PseudoElement</a></code> object representing a particular pseudo-element, the same object must be

cssom/Overview.src.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ <h2>Terminology</h2>
224224

225225
<p class=note>If another styling language becomes supported in user agents, this specification is expected to be updated as necessary.
226226

227+
<p>The terms <dfn>::before pseudo-element</dfn> and <dfn>::after pseudo-element</dfn> refer to the :before and :after pseudo-elements in CSS, except in this
228+
specification the pseudo-elements are assumed to exist for all elements even if no box is generated for them. <span data-anolis-ref>CSS</span>
229+
227230
<h3>Common Serializing Idioms</h3>
228231

229232
<p>To <dfn>escape a character</dfn> means to create a string of
@@ -2584,12 +2587,12 @@ <h3>Extensions to the <code title>Window</code> Interface</h3>
25842587
<li><p>If <var title>pseudoElt</var> is as an
25852588
<span data-anolis-spec=dom>ASCII case-insensitive</span> match for
25862589
either '<code title>:before</code>' or '<code title>::before</code>' let
2587-
<var title>obj</var> be the '::before' pseudo-element of
2590+
<var title>obj</var> be the <span>::before pseudo-element</span> of
25882591
<var title>elt</var>.</p></li>
25892592
<li><p>If <var title>pseudoElt</var> is as an
25902593
<span data-anolis-spec=dom>ASCII case-insensitive</span> match for
25912594
either '<code title>:after</code>' or '<code title>::after</code>' let
2592-
<var title>obj</var> be the '::after' pseudo-element of
2595+
<var title>obj</var> be the <span>::after pseudo-element</span> of
25932596
<var title>elt</var>.</p></li>
25942597
<li>
25952598
<p>Return a <span>CSS declaration block</span> with the
@@ -2672,11 +2675,11 @@ <h3>Extensions to the <code title>Element</code> Interface</h3>
26722675
<p>The <dfn title=dom-Element-pseudo><code>pseudo(<var title>pseudoElt</var>)</code></dfn> method, when invoked, must run the following steps:
26732676
<ol>
26742677
<li><p>If <var title>pseudoElt</var> is as an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for either '<code title>:before</code>' or
2675-
'<code title>::before</code>' return the <code>PseudoElement</code> representing the '::before' pseudo-element of the <span data-anolis-spec=dom>context
2676-
object</span>.</p></li>
2678+
'<code title>::before</code>' return the <code>PseudoElement</code> representing the <span>::before pseudo-element</span> of the
2679+
<span data-anolis-spec=dom>context object</span>.</p></li>
26772680
<li><p>If <var title>pseudoElt</var> is as an <span data-anolis-spec=dom>ASCII case-insensitive</span> match for either '<code title>:after</code>' or
2678-
'<code title>::after</code>' return the <code>PseudoElement</code> representing the '::after' pseudo-element of the <span data-anolis-spec=dom>context
2679-
object</span>.</p></li>
2681+
'<code title>::after</code>' return the <code>PseudoElement</code> representing the <span>::after pseudo-element</span> of the
2682+
<span data-anolis-spec=dom>context object</span>.</p></li>
26802683
<li><p>Return null.</p></li>
26812684
</ol>
26822685
<p>When invoked with an argument that returns a <code>PseudoElement</code> object representing a particular pseudo-element, the same object must be

0 commit comments

Comments
 (0)