Re: [csswg-drafts] [css-variables][css-pseudo] Question about setting variable values in pseudo classes (#10778)

From [8.2. The Link History Pseudo-classes: :link and :visited](https://drafts.csswg.org/selectors-4/#visited-pseudo)

> Since it is possible for style sheet authors to abuse the :link and :visited pseudo-classes to determine which sites a user has visited without the user’s consent, UAs may treat all links as unvisited links or implement other measures to preserve the user’s privacy while rendering visited and unvisited links differently.

Using custom properties to probe `visited` status is an example of the behavior described, and thus browsers ignoring setting the property in a `:visited` is a measure to prevent that, and spec compliant. This is a privacy feature, not a bug.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10778#issuecomment-2310094447 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 26 August 2024 12:30:00 UTC