MrOtherGuy,

Yes, simply using not operator with the condition:


<span style="color:#323232;">@supports not -moz-bool-pref("userchrome.my-pref.enabled"){
</span><span style="color:#323232;">  #nav-bar{ background: #f00 !important; }
</span><span style="color:#323232;">}
</span>

Small caveat though, since @supports tests whether the condition is supported, it also resolves to false if the browser doesn’t support the condition type. So if -moz-bool-pref() function is not supported (as is with Firefox 120 and above) then the condition is false. And thus, if you use negation then whole expression resolves to true.

That means that the above expression will always apply red background to nav-bar in Firefox 120 but in older Firefox version only apply it if that pref doesn’t exist or exists but is set to false

You can read all about @supports at MDN although it doesn’t list the Firefox internal-only -moz-bool-pref condition.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • FirefoxCSS@fedia.io
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • tester
  • tacticalgear
  • ethstaker
  • normalnudes
  • cisconetworking
  • cubers
  • Durango
  • Leos
  • provamag3
  • modclub
  • anitta
  • JUstTest
  • All magazines