Skip to content

Instantly share code, notes, and snippets.

@benyaminl
Last active May 2, 2021 01:44
Show Gist options
  • Save benyaminl/be7d7d0ff21a40fdee95b93b5212b25d to your computer and use it in GitHub Desktop.
Save benyaminl/be7d7d0ff21a40fdee95b93b5212b25d to your computer and use it in GitHub Desktop.
userChrome.css that remove or fix proton view on windows 10, with disabling megabar. It's originate from my works and some others from reddit /r/firefox. I hope this ease your pain on your computer views especially on old small laptop
/*** 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: block; /* [block,none] */
/* Font sizes (default: 13.8px for title, 10.2px for URL) */
--mbarstyler-title-font-size: 13px; /* [13px - 18px] */
--mbarstyler-url-font-size: 12px; /* [12px - 16px] */
/* Rows to show without scrolling */
--mbarstyler-max-rows-without-scrolling: 12;
/* Bottom border for each result row */
--mbarstyler-bottom-border-width: 0px; /* [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 One-Offs - version 2020-05-31 ***/
/*** One-Off Search Button Preferences ***/
:root {
/* One-Offs Display or Not */
--mbarstyler-oneoffs-display: flex; /* [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 ***/
/** Disable GUI Shadows */
* {
box-shadow: none !important;
}
/* Disable Hamburger Menu */
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/* #PanelUI-menu-button { margin-right: 140px !important;} */
/* End of Disable Hamburger Menu */
.tab-close-button:not([pinned]) {
display: -moz-box !important;
}
/* make firefox great again */
/* #main-window[uidensity="compact"] {
--tab-min-height: 28px !important;
}
#main-window[uidensity="compact"] .tab-close-button {
width: 24px !important;
height: 20px !important;
padding: 2px 5px !important;
} */
.tab-stack {
margin-top: 0px;
}
.tab-background {
margin: 0px !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
} /**
.tab-background[selected="true"] {
background: linear-gradient(to bottom, rgb(64, 70, 168) 2px, var(--toolbar-bgcolor) 2px, var(--toolbar-bgcolor) 100%) !important;
}
*/
.tab-context-line {
margin-top: 26px !important;
margin-left: 6px !important;
margin-right: 6px !important;
}
menupopup > menuitem, menupopup > menu {
padding-block: 0.15em !important;
}
.panel-subview-body > * {
padding: 2px 6px !important;
}
.editBookmarkPanelBottomButton {
min-width: 135px !important;
width: 50% !important;
}
/* Tab List Button */
.panel-subview-body > * {
padding: 1px !important;
}
.subviewbutton {
padding: 0px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment