Skip to content

Commit cd0d328

Browse files
committed
[css-pseudo] Add ::inactive-selection pseudo per WG resolution
1 parent 74154b5 commit cd0d328

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

css-pseudo/Overview.bs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,28 +423,31 @@ Styling the ''::first-letter'' Pseudo-element</h4>
423423
Highlight Pseudo-elements</h2>
424424

425425
<h3 id="highlight-selectors">
426-
Selecting Highlighted Content: the ''::selection'', ''::spelling-error'', and ''::grammar-error'' pseudo-elements</h3>
426+
Selecting Highlighted Content: the ''::selection'', ''::inactive-selection'', ''::spelling-error'', and ''::grammar-error'' pseudo-elements</h3>
427427

428428
The <dfn>highlight pseudo-elements</dfn>
429429
represent portions of a document that have been highlighted in some way.
430430

431431
<dl export>
432432
<dt><dfn>::selection</dfn>
433+
<dt><dfn>::inactive-selection</dfn>
433434
<dd>
434-
The <a>::selection</a> pseudo-element represents
435+
The ''::selection'' and ''::inactive-selection'' pseudo-elements represent
435436
the portion of a document that has been highlighted by the user.
436437
This also applies, for example, to selected text within an editable text field.
437438

438-
Issue: Active vs. inactive selections are often styled differently. Currently no way to distinguish.
439+
''::selection'' applies to active selections,
440+
wherease ''::inactive-selection'' applies to inactive selections
441+
(e.g. when the document window is inactive and therefore not receiving events).
439442

440443
<dt><dfn>::spelling-error</dfn>
441444
<dd>
442-
The <a>::spelling-error</a> pseudo-element represents
445+
The ''::spelling-error'' pseudo-element represents
443446
a portion of text that has been flagged by the user agent as misspelled.
444447

445448
<dt><dfn>::grammar-error</dfn>
446449
<dd>
447-
The <a>::grammar-error</a> pseudo-element represents
450+
The ''::grammar-error'' pseudo-element represents
448451
a portion of text that has been flagged by the user agent as grammatically incorrect.
449452
</dl>
450453

@@ -915,6 +918,7 @@ Changes</h2>
915918
<ul>
916919
<li>Addition of the ''::marker'' pseudo-element.
917920
<li>Removed special handling of floated ''::first-letter'' in favor of <a href="https://www.w3.org/TR/css-inline-3/#initial-letter-styling">initial letter styling</a>. [[CSS-INLINE-3]]
921+
<li>Added ''::inactive-selection''.
918922
<li>Defined handling of text decorations on ''::selection'' to match IE's more sensible behavior.
919923
<li>Links to pseudo-element OM design discussions.
920924
<li>Various minor clarifications.

0 commit comments

Comments
 (0)