Hi. I’ve been experimenting with MrOtherGuy’s vertical tabs script. I found that the tab bar could be moved to the right side of the window with just two simple changes:
change line 19 from: margin-left: var(--uc-vertical-tabs-width); to margin-right: var(--uc-vertical-tabs-width);
and
change line 31 from: left: 0; to right: 0;
Works for me.

Indeed. Would make sense to have a pref to toggle that. And what do you know, now there is! Thanks for the idea :)
Great, thanks!
Line 39: @media (-moz-bool-pref: “userchrome.vertical-tabs.on-right.enabled”){
This line doesn’t work for me, even though I have set that preference. If I comment out this line (and its closing brace), then the code block does work correctly–it just doesn’t recognize the preference. Could it be because I’m testing on FF 115 ESR?
In multi-row_tabs_below_content.css (a commit from June) this line:
Line 239: @supports -moz-bool-pref(“userchrome.multirowtabs.static-menubar.enabled”){
and its code block do work correctly for me.
Back to vertical_tabs.css, I tried using @supports instead of @media, and that did work.
-moz-bool-prefused a as media query requires Firefox 120. It should work totally fine in ESR 115 if you make it a@supportsquery instead.It does. Is there a way to query a preference to determine whether it is 0, 1, 2, 3 etc.?
No. I know it would be super useful for some things, but there is no such thing.
That’s what I suspected. Is it just possible that a boolean preference can be tested to be true or tested to be false?
Well, boolean cannot have any other values except for
trueandfalse- it wouldn’t be a boolean if it did. Although there’s sort of a third option as “pref doesn’t exist” but thefalsecategory includes that.So, a @supports can query whether a preference is true. Can it also query whether a preference is false (or doesn’t exist)? So, could we have a block that executes only when a preference is false (or doesn’t exist)?
Yes, simply using
notoperator with the condition:@supports not -moz-bool-pref("userchrome.my-pref.enabled"){ #nav-bar{ background: #f00 !important; } }Small caveat though, since
@supportstests 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 totrue.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
falseYou can read all about
@supportsat MDN although it doesn’t list the Firefox internal-only-moz-bool-prefcondition.