Last active
January 26, 2021 20:21
-
-
Save Jakob-PB/56835ff2a8743f11b601852fd02f0fdf to your computer and use it in GitHub Desktop.
My custom userChrome.css file I use for tweaking Firefox's behaviour
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** BEGIN - Override URL bar enlargement ***/ | |
/* Compute new position, width, and padding */ | |
#urlbar[breakout][breakout-extend] { | |
top: 5px !important; | |
left: 0px !important; | |
width: 100% !important; | |
padding: 0px !important; | |
} | |
/* for alternate Density settings */ | |
[uidensity="compact"] #urlbar[breakout][breakout-extend] { | |
top: 3px !important; | |
} | |
[uidensity="touch"] #urlbar[breakout][breakout-extend] { | |
top: 4px !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; | |
} | |
/*** END - Override URL bar enlargement ***/ | |
/*** BEGIN - Autohide bookmarks ***/ | |
#PersonalToolbar{ | |
--uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */ | |
--uc-bm-padding: 6px; /* Vertical padding to be applied to bookmarks */ | |
--uc-autohide-toolbar-delay: 100ms; /* The toolbar is hidden after 0.1s */ | |
} | |
:root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px } | |
:root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 6px } | |
#PersonalToolbar:not([customizing]){ | |
position: relative; | |
margin-bottom: calc(0px - var(--uc-bm-height) - 2 * var(--uc-bm-padding)); | |
transform: rotateX(90deg); | |
transform-origin: top; | |
transition: transform 135ms linear var(--uc-autohide-toolbar-delay) !important; | |
z-index: 1; | |
} | |
#PlacesToolbarItems > .bookmark-item{ padding-block: var(--uc-bm-padding) !important; } | |
/* SELECT BOOKMARKS TOOLBAR BEHAVIOR */ | |
/* Comment out or delete either one of these to disable that behavior */ | |
/* Show when urlbar is focused */ | |
#nav-bar:focus-within + #PersonalToolbar{ | |
transition-delay: 100ms !important; | |
transform: rotateX(0); | |
} | |
/* Show when cursor is over the toolbar area */ | |
/* #navigator-toolbox:hover > #PersonalToolbar{ | |
transition-delay: 100ms !important; | |
transform: rotateX(0); | |
} */ | |
/*** END - Autohide bookmarks ***/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To enable this Firefox bookmarks bar auto-hiding customization follow these steps: