nixos-configuration/home-manager/modules/firefox/userChrome.css
2021-11-17 16:08:19 +00:00

221 lines
8.4 KiB
CSS

@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
/* hide tab toolbar */
#TabsToolbar {
visibility: collapse !important;
}
/*** Megabar Styler General - version 2020-07-27 ***/
/*** General Preferences ***/
:root {
/* Number of pixels of enlargement when URL bar is focused */
--mbarstyler-popout-pixels: 0px; /* [0px - 7px] */
/* Top Bar Display or Not */
--mbarstyler-top-bar-display: none; /* [block,none] */
/* Font sizes (default: 13.8px for title, 10.2px for URL) */
--mbarstyler-title-font-size: 15px; /* [13px - 18px] */
--mbarstyler-url-font-size: 13px; /* [12px - 16px] */
/* Rows to show without scrolling */
--mbarstyler-max-rows-without-scrolling: 10;
/* Bottom border for each result row */
--mbarstyler-bottom-border-width: 1px; /* [0px or 1px] */
/* Match display style */
--mbarstyler-match-weight: 700; /* [400,700] */
--mbarstyler-match-background-opacity: 0.0; /* [0.0,0.05,0.1] */
}
/*** URL bar enlargement or lack thereof ***/
/* Compute new position, width, and padding */
#urlbar[breakout][breakout-extend] {
top: calc(5px - var(--mbarstyler-popout-pixels)) !important;
left: calc(0px - var(--mbarstyler-popout-pixels)) !important;
width: calc(100% + (2 * var(--mbarstyler-popout-pixels))) !important;
padding: var(--mbarstyler-popout-pixels) !important;
}
[uidensity="compact"] #urlbar[breakout][breakout-extend] {
top: calc(3px - var(--mbarstyler-popout-pixels)) !important;
}
[uidensity="touch"] #urlbar[breakout][breakout-extend] {
top: calc(4px - var(--mbarstyler-popout-pixels)) !important;
}
/* Prevent shift of URL bar contents */
#urlbar[breakout][breakout-extend] > #urlbar-input-container {
height: var(--urlbar-height) !important;
padding: 0 !important;
}
/* Do not animate */
#urlbar[breakout][breakout-extend] > #urlbar-background {
animation: none !important;;
}
/* Remove shadows */
#urlbar[breakout][breakout-extend] > #urlbar-background {
box-shadow: none !important;
}
/*** Top "Blue Bar" Display ***/
.urlbarView-row:first-of-type {
display: var(--mbarstyler-top-bar-display) !important;
}
/*** Font Sizes and Scrolling ***/
/* Title font-size */
.urlbarView-row .urlbarView-title {
font-size: var(--mbarstyler-title-font-size) !important;
}
/* URL / action font-size */
.urlbarView-row .urlbarView-secondary,
.urlbarView-row .urlbarView-url,
.urlbarView-row .urlbarView-action {
font-size: var(--mbarstyler-url-font-size) !important;
}
/* Set max-height for items visible without scrolling */
#urlbarView-results, #urlbar-results {
height: unset !important;
max-height: calc(2.5 * (var(--mbarstyler-title-font-size) + var(--mbarstyler-bottom-border-width)) * var(--mbarstyler-max-rows-without-scrolling)) !important;
}
#urlbar-results {
overflow-y: auto !important;
}
/* Clean up extra spacing at the top and bottom */
#urlbar-results {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
/* Subtle border between results */
.urlbarView-row:not(:last-of-type) {
border-bottom: var(--mbarstyler-bottom-border-width) solid rgba(0, 0, 0, 0.1) !important;
}
/* Match Styling Like Fx43-47 */
.urlbarView-row:not([selected]) .urlbarView-title strong,
.urlbarView-row:not([selected]) .urlbarView-url strong {
font-weight: var(--mbarstyler-match-weight) !important;
border-radius: 2px;
box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, calc(var(--mbarstyler-match-background-opacity) * 2));
background-color: rgba(0, 0, 0, var(--mbarstyler-match-background-opacity));
}
[lwt-popup-brighttext] .urlbarView-row:not([selected]) .urlbarView-title strong,
[lwt-popup-brighttext] .urlbarView-row:not([selected]) .urlbarView-url strong {
box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, calc(var(--mbarstyler-match-background-opacity) * 2));
background-color: rgba(255, 255, 255, var(--mbarstyler-match-background-opacity));
}
[lwthemetextcolor="bright"] .urlbarView-row:not([selected]) .urlbarView-title strong,
[lwthemetextcolor="bright"] .urlbarView-row:not([selected]) .urlbarView-url strong {
box-shadow: inset 0 0 1px 1px rgba(192, 192, 192, calc(var(--mbarstyler-match-background-opacity) * 4));
background-color: rgba(192, 192, 192, calc(var(--mbarstyler-match-background-opacity) * 3));
}
/*** End of: Megabar Styler General ***/
/*** Megabar Styler Two-Row Flex Layout - version 2020-06-03 ***/
/* !!! Requires variables from Megabar Styler General !!! */
/* Adjust heights for scrolling */
#urlbarView-results, #urlbar-results {
max-height: calc(1.625 * (var(--mbarstyler-title-font-size) + var(--mbarstyler-url-font-size) + var(--mbarstyler-bottom-border-width)) * var(--mbarstyler-max-rows-without-scrolling)) !important;
}
/* Wrap the url (adapted from Fx75 narrow bar design) */
.urlbarView-row-inner {
flex-wrap: wrap !important;
padding-top: 0 !important;
padding-bottom: 2px !important;
}
.urlbarView-no-wrap {
max-width: 100% !important;
flex-basis: 100% !important;
position: relative;
}
/* Adjust horizontal and vertical URL position */
.urlbarView-row[has-url] > .urlbarView-row-inner > .urlbarView-url {
padding-inline-start: calc(6px + 2px + /* favicon */ 16px) !important;
margin-top: calc(2px + (var(--mbarstyler-url-font-size) - var(--mbarstyler-title-font-size)));
}
/* Hide the separator if there's a URL */
.urlbarView[actionoverride] .urlbarView-row[has-url] .urlbarView-title-separator,
.urlbarView .urlbarView-row[has-url]:not([type$=tab]) .urlbarView-title-separator,
.urlbarView .urlbarView-row[type=remotetab]:-moz-any(:hover, [selected]) .urlbarView-title-separator {
display: none !important;
}
/* Move Switch Tab info to URL line :: added 2020-04-12 */
/* Make sure URL is always visible */
.urlbarView-row[type="switchtab"][has-url="true"] .urlbarView-url {
visibility: visible !important;
}
/* Show Switch to Tab or Open depending on [actionoverride] */
.urlbarView:not([actionoverride]) .urlbarView-row[type="switchtab"][has-url="true"] .urlbarView-url::before {
content: "Switch to Tab: ";
font-style: italic;
color: var(--urlbar-popup-action-color);
}
.urlbarView:not([actionoverride]) .urlbarView-row[type="switchtab"][has-url="true"][selected] .urlbarView-url::before {
color: HighlightText; /* 2020-05-31 improve visibility when selected */
}
.urlbarView[actionoverride] .urlbarView-row[type="switchtab"][has-url="true"] .urlbarView-url::before {
content: "Open: ";
font-style: italic;
color: var(--urlbar-popup-action-color);
}
.urlbarView[actionoverride] .urlbarView-row[type="switchtab"][has-url="true"][selected] .urlbarView-url::before {
color: HighlightText; /* 2020-05-31 improve visibility when selected */
}
/* Hide the existing Action phrase and separator */
.urlbarView-row[type="switchtab"][has-url="true"] .urlbarView-action,
.urlbarView-row[type="switchtab"][has-url="true"] .urlbarView-title-separator {
display: none !important;
}
/* A little more room for the address bar when drop-down is open :: added 2020-06-02 */
.urlbarView {
margin-block-start: 0 !important;
}
/*** End of: Megabar Styler Two-Row Flex Layout ***/
/*** Megabar Styler One-Offs - version 2020-05-31 ***/
/*** One-Off Search Button Preferences ***/
:root {
/* One-Offs Display or Not */
--mbarstyler-oneoffs-display: none; /* [flex,none] */
}
/* Show or Hide the One-Offs Search Icon Bar */
#urlbar .search-one-offs:not([hidden]) {
display: var(--mbarstyler-oneoffs-display) !important;
}
/* Shorten the One-Offs Search Icon Bar Vertically */
#urlbar .search-one-offs:not([hidden]) {
padding-block: unset !important;
}
/* We don't need the text */
#urlbar .search-one-offs .search-panel-header {
display: none !important;
}
/*** End of: Megabar Styler One-Offs ***/
}