W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2019

Re: [csswg-drafts] [css-pseudo-4] ::selection vs ::inactive-selection (#4579)

From: Sanket Joshi via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Dec 2019 08:19:20 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-566926751-1576657159-sysbot+gh@w3.org>
I think having separate pseudo elements for native selection highlights (ie. the second option) makes sense because we have separate pseudo elements for all other types of highlights, including custom highlights.

The main difference between this case and the ::spelling-error + ::grammar-error case seems to be that both ::selection and ::inactive-selection will apply to the same set of ranges. If we wanted to emulate this case with custom highlights, we wouldn't be able to do so today as we would have to use separate HighlightRangeGroups for active and inactive selection, which means we would be dealing with separate sets. But if we implemented #4613 , then we could have custom highlights for each selection state applying to the same group, and we would have separate pseudo elements for both.

-- 
GitHub Notification of comment by sanketj
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4579#issuecomment-566926751 using your GitHub account
Received on Wednesday, 18 December 2019 08:19:22 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:57 UTC