nixos-config/modules/home/firefox/userChrome.css

218 lines
6.6 KiB
CSS
Raw Normal View History

2023-11-08 22:36:37 +01:00
/* Sidebery */
#main-window[titlepreface*=""] .tabbrowser-tab {
visibility: collapse;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window[titlepreface*=""] .titlebar-button {
height: 40px;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window[titlepreface*=""] #nav-bar {
/* margin-top: -40px; */
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window[titlepreface*=""][tabsintitlebar="true"] #nav-bar {
/* margin-right: 137px; */
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window[titlepreface*=""] #titlebar-spacer {
background-color: var(--chrome-secondary-background-color);
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window[titlepreface*=""] #titlebar-buttonbox-container {
background-color: var(--chrome-secondary-background-color);
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window[titlepreface*=""] .titlebar-color {
background-color: var(--toolbar-bgcolor);
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box #sidebar-header {
visibility: collapse;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
/* Show sidebar only when the cursor is over it */
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
#sidebar-box {
--uc-sidebar-width: 47px;
--uc-sidebar-hover-width: 232px;
--uc-autohide-sidebar-delay: 050ms; /* Wait 0.6s before hiding sidebar */
position: relative;
min-width: var(--uc-sidebar-width) !important;
width: var(--uc-sidebar-width) !important;
max-width: var(--uc-sidebar-width) !important;
z-index:1;
margin-top: -1px;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box[positionend] {
direction: rtl;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box[positionend] > *{
direction: ltr;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box[positionend]:-moz-locale-dir(rtl){
direction: ltr;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{
direction: rtl;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box > #sidebar {
transition: min-width 100ms cubic-bezier(0,0,0,1.01) !important;
min-width: var(--uc-sidebar-width) !important;
will-change: min-width;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box:hover > #sidebar {
min-width: var(--uc-sidebar-hover-width) !important;
transition: min-width 100ms cubic-bezier(0,0,0,1.01) var(--uc-autohide-sidebar-delay), box-shadow 500ms linear !important;
box-shadow: 0 0 4px rgba(10,10,10, .5);
clip-path: inset(0px -15px 0px -15px);
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
/* Add sidebar divider and give it background */
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
#sidebar,
#sidebar-header {
background-color: var(--toolbar-bgcolor) !important;
border-inline: 1px solid var(--chrome-content-separator-color);
border-inline-width: 0px 1px;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
#sidebar-box[positionend] > * {
border-inline-width: 1px 0px;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel {
inset-inline: auto 0px !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label {
margin-inline: 0px !important;
border-left-style: solid !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#sidebar-splitter{
width: 0px !important;
background-color: #f00 !important;
border: none !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_bookmarks_toolbar.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
#PersonalToolbar{
--uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */
--uc-bm-padding: 7px; /* Vertical padding to be applied to bookmarks */
--uc-autohide-toolbar-delay: 600ms; /* The toolbar is hidden after 0.6s */
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
/* 0deg = "show" ; 90deg = "hide" ; Set the following to control when bookmarks are shown */
--uc-autohide-toolbar-focus-rotation: 0deg; /* urlbar is focused */
--uc-autohide-toolbar-hover-rotation: 0deg; /* cursor is over the toolbar area */
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
:root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px; }
:root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 7px }
2023-11-05 11:40:44 +01:00
2023-11-08 22:36:37 +01:00
#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;
/* The following properties should allow the themes with trasparent toolbars to work */
background-color: transparent !important;
background-repeat: no-repeat,no-repeat,var(--lwt-background-tiling);
--uc-bg-y: calc(-2 * (var(--tab-block-margin) + var(--toolbarbutton-inner-padding) + var(--toolbarbutton-outer-padding)) - var(--tab-min-height) - 16px - var(--bookmark-block-padding));
background-position: top left,top left,var(--lwt-background-alignment,top left);
background-position-y:top,top,var(--uc-bg-y),var(--uc-bg-y),var(--uc-bg-y);
background-image: var(--toolbar-bgimage), linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image,var(--lwt-additional-images)) !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#PlacesToolbarItems > .bookmark-item,
#OtherBookmarks,
#PersonalToolbar > #import-button{
padding-block: var(--uc-bm-padding) !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#nav-bar:focus-within + #PersonalToolbar{
transition-delay: 100ms !important;
transform: rotateX(var(--uc-autohide-toolbar-focus-rotation,0));
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#navigator-toolbox:hover > #PersonalToolbar{
transition-delay: 100ms !important;
transform: rotateX(var(--uc-autohide-toolbar-hover-rotation,0));
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#navigator-toolbox:hover > #nav-bar:focus-within + #PersonalToolbar {
transform: rotateX(0);
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#navigator-toolbox-background {
appearance: none !important;
background: @backgroundColor@ !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#titlebar {
display: none !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#nav-bar {
margin-right: 0 !important;
background: none !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
.titlebar-close {
visibility: hidden !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
.titlebar-buttonbox-container {
visibility: hidden !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#main-window {
background: none !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#navigator-toolbox {
2023-11-05 11:40:44 +01:00
border: none !important;
}
2023-11-08 22:36:37 +01:00
#urlbar-go-button,
#identity-box,
#star-button-box,
#pageActionButton,
#tracking-protection-icon-container,
#page-action-buttons {
display: none !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#urlbar-input {
padding-left: 5px !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
#urlbar:not([breakout][breakout-extend]) > #urlbar-background {
2023-11-05 11:40:44 +01:00
background: transparent !important;
2023-11-08 22:36:37 +01:00
border: #00000061 !important;
border: transparent !important;
outline: none !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
/* Uncomment to enable compatibility for multi-row_bookmarks.css */
/* This would break buttons placed in the toolbar but that is likely not happening if you are using multi-row setup */
/*
#PersonalToolbar:not([customizing]){
position: fixed;
display: block;
margin-bottom: 0px !important;
2023-11-05 11:40:44 +01:00
}
2023-11-08 22:36:37 +01:00
*/