/*== ShyFox Polish (content) ======================================================================== Visual polish for the documents userContent.css can reach: the Sidebery sidebar, about:home and about:newtab, the about: / chrome: pages, and extension popups. This file is imported after content/shy-sidebery.css, content/shy-new-tab.css, content/shy-about.css and content/shy-global-content.css, so it extends them instead of repeating them. Everything is scoped by @-moz-document. Nothing here may reach an ordinary web page. Colours come from the five ShyFox variables -- --bg-col, --tb-col, --bt-col, --pp-col and --shy-color -- exactly as in the chrome layer, and from shy-tokens.css, which userContent.css imports. The accent, elevation and motion scales are taken from there unchanged. The only local tokens are the neutral tints, which are the shy-tokens scales re-anchored per document (see the token block below), plus one composite built from them. The whole file sits behind `shyfox.disable.polish`; the one backdrop blur it adds sits behind `shyfox.disable.blur` as well. ===================================================================================================*/ @media not -moz-pref("shyfox.disable.polish") { /*== TOKENS ======================================================================================== One shared block for every document this file touches. These are the same percentages shy-tokens.css uses for --shy-hairline, --shy-hover-tint, --shy-active-tint, --shy-selected-tint, --shy-text-dim and --shy-scrollbar. What differs is only what they are mixed from: shy-tokens anchors them to --bt-col, the *chrome's* ink. That is right inside the Sidebery sidebar, which ShyFox repaints, and wrong on an about: page, which keeps Firefox's own in-content palette and can be light while the chrome is dark -- a --bt-col hairline would vanish there. So the family is anchored to --shy-c-ink instead: `currentColor` by default, --bt-col where ShyFox owns the surface. Each scope declares --shy-c-ink on :root and the whole family follows it, because a custom property is substituted only after the cascade has picked a winner for its input. */ @-moz-document url-prefix("about:"), url-prefix("chrome:"), url-prefix("moz-extension:") { :root { /* what the neutral tints are mixed from; overridden per scope below */ --shy-c-ink: currentColor; --shy-c-hairline: color-mix(in srgb, var(--shy-c-ink) 13%, transparent); --shy-c-hairline-strong: color-mix(in srgb, var(--shy-c-ink) 22%, transparent); /* the resting fill of a raised control: one step up from the sidebar surface */ --shy-c-fill: color-mix(in srgb, var(--bt-col) 7%, transparent); --shy-c-hover: color-mix(in srgb, var(--shy-c-ink) 10%, transparent); --shy-c-pressed: color-mix(in srgb, var(--shy-c-ink) 16%, transparent); --shy-c-selected: color-mix(in srgb, var(--shy-c-ink) 22%, transparent); /* text that is deliberately quieter than the ink, for a list's resting rows */ --shy-c-text-quiet: color-mix(in srgb, var(--shy-c-ink) 65%, transparent); --shy-c-scroll-thumb: color-mix(in srgb, var(--shy-c-ink) 28%, transparent); /* the one composite: the marker for "this row is the current one", a bar and not a fill. box-shadow has no logical-property form, so the direction is flipped here rather than in each of the rules that use it. */ --shy-c-accent-bar: inset 3px 0 0 0 var(--shy-color); &:dir(rtl) {--shy-c-accent-bar: inset -3px 0 0 0 var(--shy-color);} } } /*== SIDEBERY ====================================================================================== The sidebar is this user's tab bar, so it gets the most care. Sidebery paints from two tiers: --s-* written as inline style on
from browser.theme, and a derived tier on #root keyed by four independent data-*-color-scheme attributes. Overriding the --s-* tier on #root is the lever that reaches both -- it feeds every derived variable *and* every direct `var(--s-*, fallback)` read in Sidebery's sheet, in the dark and the light branch alike, whatever the user's "Color scheme" setting is. userContent.css is a user sheet, so !important here outranks Sidebery's author rules, its runtime