Skip to content

Commit

Permalink
[css-pseudo-4] Add CSSPseudoElement.element attribute
Browse files Browse the repository at this point in the history
Fixes #2816.
  • Loading branch information
birtles committed Jan 21, 2019
1 parent 8922e75 commit 2dbf1e4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -838,13 +838,14 @@ Interface CSSPseudoElement</h3>
[Exposed=Window]
interface CSSPseudoElement {
readonly attribute CSSOMString <a href="#dom-csspseudochild-type">type</a>;
readonly attribute Element element;
readonly attribute <a href="https://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration">CSSStyleDeclaration</a> <a href="#dom-csspseudochild-style">style</a>;
};

CSSPseudoElement implements EventTarget;
</pre>

The <dfn id="dom-csspseudochild-type">type</dfn> attribute
The <dfn attribute for=CSSPseudoElement>type</dfn> attribute
is a string representing the type of the pseudo-element.
This can be one of the following values:

Expand All @@ -863,7 +864,10 @@ Interface CSSPseudoElement</h3>

Issue: Why are these strings different from the name of the pseudo-element?

The <dfn id="dom-csspseudochild-style">style</dfn> attribute
The <dfn attribute for=CSSPseudoElement>element</dfn> attribute is the
[=originating element=] of the pseudo-element.

The <dfn attribute for=CSSPseudoElement>style</dfn> attribute
is a <code>CSSStyleDeclaration</code> [[!CSSOM]]
that allows directly setting style information (inline styles) onto the pseudo-element.
Inline styles on a <code>CSSPseudoElement</code> have precedence over all
Expand Down Expand Up @@ -949,6 +953,8 @@ Changes</h2>
<li>Links to pseudo-element OM design discussions.
<li>Various minor clarifications.
<li>Use ''spelling-error'' and ''grammar-error'' with ''::spelling-error'' and ''::grammar-error'' in the UA stylesheet.
<li>Added the {{CSSPseudoElement/element}} attribute to the
{{CSSPseudoElement}} interface.
</ul>

<h2 class="no-num" id="acknowledgements">
Expand Down

0 comments on commit 2dbf1e4

Please sign in to comment.