Bug 1946764 - Support non-boolean media query prefs via -moz-pref(). r=firefox-style-system-reviewers,desktop-theme-reviewers,settings-reviewers,tabbrowser-reviewers,places-reviewers,sidebar-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,dao,mconley,dshin,mak

Allow querying int and string prefs too via functional syntax:

```
@media -moz-pref("pref-name", <value>) {
```

No argument means the pref exists and has a non-zero/false/empty value.
Unfortunately stylelint is still unhappy with this so we need to keep
the annoying comments...

Differential Revision: https://phabricator.services.mozilla.com/D237275
This commit is contained in:
Emilio Cobos Álvarez
2025-02-12 12:14:42 +00:00
parent faa30a7240
commit c67d8c9c9c
34 changed files with 293 additions and 122 deletions

View File

@@ -66,7 +66,7 @@ body {
z-index: 1;
/* stylelint-disable-next-line media-query-no-invalid */
@media not (-moz-bool-pref: "sidebar.revamp") {
@media not -moz-pref("sidebar.revamp") {
display: none;
}
}