Skip to content

[css-pseudo-4] ::selection vs ::inactive-selection #4579

Description

@fantasai

The spec seems to imply that ::selection and ::inactive-selection are mutually exclusive, when actually ::selection applies to inactive selections currently. The spec should be updated to make their interaction compatible with this behavior.

Possibilities:

  • ::selection and ::inactive-selection apply to the same highlight pseudo-element, possibly with ::inactive-selection at a higher specificity
  • ::selection and ::inactive-selection are separate highlight pseudo-elements that both apply to the range of an inactive selection, with ::inactive-selection at a higher level than ::selection (in the same way ::spelling-error and ::grammar-error layer when applied to the same text)

Interested in feedback from any implementers, on what makes sense implementation-wise.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions