[csswg-drafts] [mediaqueries-5] Ability to retrieve the original value of an overridden preference (#11580)

lukewarlow has just created a new issue for https://github.com/w3c/csswg-drafts:

== [mediaqueries-5] Ability to retrieve the original value of an overridden preference ==
Copied from:https://github.com/WICG/web-preferences-api/issues/38

> (Copying from a mastodon thread with some rewording — https://front-end.social/@kizu/113160248251763608)

There are legit cases when you'd want to override the value that is used everywhere, but then still be able to differentiate how things look/behave based both on the original value, and on the override. See https://blog.kizu.dev/querying-the-color-scheme/#not-the-user-preference, for example — it is very similar to what we'll have with the web preferences.

With the way things are specified right now, we could do it in a hacky way: clear the override, read the value, restore the override, but that feels very cumbersome and inconvenient.

It would be great if we could get the original value natively (and also monitor it similar to matchMedia maybe).

cc @kizu 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11580 using your GitHub account


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

Received on Monday, 27 January 2025 14:47:51 UTC