Мои настройки UserChrome.css Firefox
Posted on Чт 13 февраля 2025 in misc
about:config:
icefox.disable-autohide-sidebar false
icefox.disable-sidebar-border true
icefox.disable-sidebar-overlay-header false
icefox.disable-tabbar false
icefox.pip-border true
icefox.show-pinned-tabs false
icefox.toggle-tabbar true
icefox.urlbar-centered true
icefox.urlbar-scrollable true
browser.sessionstore.restore_pinned_tabs_on_demand true
icefox.floating-findbar-on-right.enabled true
icefox.floating-findbar true
userChrome.css:
@import url("recipes/hide-tabbar.css") (-moz-bool-pref: "icefox.disable-tabbar");
@import url("recipes/autohide-sidebar.css");
@import url("recipes/overlay_sidebar_header.css") not (-moz-bool-pref: "icefox.disable-sidebar-overlay-header");
@import url("recipes/urlbar-scrollable.css") (-moz-bool-pref: "icefox.urlbar-scrollable");
@import url("recipes/urlbar_centered_text.css") (-moz-bool-pref: "icefox.urlbar-centered");
@import url("recipes/pip-border.css") (-moz-bool-pref: "icefox.pip-border");
@import url("recipes/toggle-tabbar.css") (-moz-bool-pref: "icefox.toggle-tabbar");
@import url("recipes/floating-findbar.css") (-moz-bool-pref: "icefox.floating-findbar");
@import url("recipes/sideberry.css");
/*? native vertical tabs background color */
#sidebar-box { background: var(--lwt-accent-color) !important; }
userContent.css:
@import url("recipes/sideberry.css");
recipes/hide-tabbar.css (скрыть горизонтальные вкладки):
#TabsToolbar, #sidebar-header { display: none; }
/*#TabsToolbar, #sidebar-header { display: none; }*/
recipes/toggle-tabbar.css (показывать горизонтальные вкладки если sideberry или tst скрыты):
:root:not([customizing]):has(#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([hidden])),
/* Tree Style Tab */
:root:not([customizing]):has(#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:not([hidden])),
/* Tab Center Reborn */
:root:not([customizing]):has(#sidebar-box[sidebarcommand="tabcenter-reborn_ariasuni-sidebar-action"]:not([hidden])) {
/* Height of navbar, used for determining height and position of window controls */
--uc-navbar-height: 38px;
/* Drag space next to the window controls, allows you to move the window more easily */
--uc-titlebar-drag-space: 40px;
/* Hide the tabs */
& #TabsToolbar {
visibility: collapse !important;
}
}
recipes/overlay_sidebar_header.css (атоскрывающаяся кнопка выбора боковой панели):
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/overlay_sidebar_header.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* This is a hack that only "kinda" works! */
/* Changes sidebar header to appear as small "notch" at the top of the sidebar. Hovering it will show full sidebar so you can have access to sidebar switcher button. The caveat is that you need to click the switcher button TWICE - otherwise the header and switcher popup will hide themselver as soon as cursor is moved on top of the switcher popup. */
#sidebar-header{
display: flex;
position: absolute;
width: inherit;
visibility: hidden;
background-color: inherit;
-moz-user-focus: normal;
}
#sidebar-header::before{
visibility: visible;
content: "";
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
background-color: inherit;
border: 2px solid var(--chrome-content-separator-color);
border-top: none;
height: 8px;
width: 14px;
margin-top: -9px;
margin-inline-start: -4px;
}
#sidebar-switcher-target.active{
pointer-events: none;
}
#sidebar-header:focus-within,
#sidebar-header:hover{
visibility: visible;
}
#sidebar-spacer{
flex-grow: 1;
}
recipes/urlbar_centered_text.css (центрирование текста в строке адреса):
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/urlbar_centered_text.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
#urlbar:not([focused]) #urlbar-input, /* ID for Firefox 70 */
#urlbar:not([focused]) .urlbar-input{ text-align: center !important; }
recipes/urlbar-scrollable.css (прокрутка в выпадающем списке адресной строки):
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/scrollable_urlbar_popup.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Makes the urlbar dropdown scrollable */
/* Modify the pref browser.urlbar.maxRichResults to set how many results should be shown */
#urlbar-results{
max-height: 400px; /* Maximum height for the list, modify as needed */
overflow-y: auto;
scrollbar-color: var(--urlbar-separator-color,currentColor) transparent;
scrollbar-width: thin
}
.urlbarView-no-wrap{
position: relative;
}
recipes/pip-border.css (зелёная окантовка окна картинка-в-картинке:
html[windowtype="Toolkit:PictureInPicture"] > body::after {
content: "";
position: absolute;
top: 0;
height: 100%;
width: 100%;
outline: 2px solid green;
outline-offset: -2px;
pointer-events: none;
}
recipes/autohide-sidebar.css (автоскрытие боковой панели):
:root {
--icefox-autohide-sidebar-extended: 330px; /* width of panel extended */
--icefox-autohide-sidebar-collapsed: 41px; /* width of panel collapsed */
--sidebar-height: calc(100vh - 45px) /*96.5vh;*/
--icefox-sidebar-splitter-width 8px;
--splitter-width: var(--icefox-sidebar-splitter-width) !important;
}
/* --------Sidebery Auto-hiding Sidebar ----------- */
@media not (-moz-bool-pref: "icefox.disable-autohide-sidebar") {
/* width of panel (grey box) (different from width of each tab) */
#main-window:not([extradragspace="true"])
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([hidden]) {
width: var(--icefox-autohide-sidebar-collapsed) !important;
min-width: 0 !important;
z-index: 999;
transition: all 0.2s ease-in-out; /* doesn't do anything unless you uncomment lower bit of code */
}
/* width of panel (grey box) on hover */
/* uncomment this section if you want the webpage to move when your tabs are extended- otherwise covers */
/*
#main-window:not([extradragspace="true"])
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:not([hidden]):hover {
width: var(--icefox-autohide-sidebar-extended) !important;
min-width: unset !important;
z-index: 1;
}
*/
/* width of tabs */
#main-window:not([extradragspace="true"])
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] #sidebar {
width: var(--icefox-autohide-sidebar-collapsed) !important;
transition: all 0.2s ease-in-out;
}
/* width of tabs on hover */
#main-window:not([extradragspace="true"])
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover #sidebar {
width: var(--icefox-autohide-sidebar-extended) !important;
}
}
/* adjust if your sidebery is not tall enough */
#main-window:not([extradragspace="true"])[inFullscreen]
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"],
#main-window:not([extradragspace="true"])
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] { height: var(--sidebar-height); }
/*? remove ugly border below "tabs" text */
#sidebar-header { border-bottom: 0 !important; }
@media (-moz-bool-pref: "icefox.disable-sidebar-border") {
#sidebar-splitter {
--sidebar-splitter: var(--icefox-sidebar-splitter-width) !important;
width: var(--sidebar-splitter) !important;
min-width: var(--sidebar-splitter) !important;
background: rgba(0, 0, 0, 0) !important;
border: 0 !important;
margin: 0 !important;
}
}
recipes/sideberry.css (настройки sideberry):
@-moz-document regexp("^moz-extension://.*?/sidebar/sidebar.html") {
@media not (-moz-bool-pref: "icefox.show-pinned-tabs") {
#root.root {
.PinnedTabsBar { flex-wrap: nowrap!important; }
}
}
#nav_bar {
padding: 2px !important;
}
#root.root {--toolbar-bg: transparent;}
#root.root {--frame-bg: #ffffffff !important;}
#root.root {--general-border-radius: 8px !important;}
#root.root {--general-margin: 6px !important;}
.Tab .body::before, .NavigationBar .nav-item, .Sidebar .tool-btn::before, .TabsPanel .new-tab-btn::before, .CtxMenu .opt::before, .icon-opt::before {
transition: background 0.075s linear, opacity 0.075s linear;
}
.hidden-panels-popup-layer > * {
background: var(--s-frame-bg) !important;
}
@media not (-moz-bool-pref: "icefox.disable-autohide-sidebar") {
#root:not(:hover) .top-horizontal-box, #root:not(:hover) .BottomBar {
opacity: 0;
transition: all 0s;
}
#root .top-horizontal-box, #root .BottomBar {
transition: opacity 0.25s cubic-bezier(0.075, 0.82, 0.165, 1) !important;
}
#root:not(:hover) .scroll-container {
overflow: hidden !important;
}
#root:not(:hover) .scroll-container > * {
width: fit-content;
}
#root:not(:hover) .Tab {
padding-left: 0 !important;
}
#root:not(:hover) .Tab > .body > *:not(.fav) {
display: none !important;
}
#root:not(:hover) .new-tab-btns svg {
opacity: 0 !important;
transition: opacity 0.25s cubic-bezier(0.075, 0.82, 0.165, 1);
}
#root:not(:hover) .new-tab-btns {
transition: all 0.25s cubic-bezier(0.075, 0.82, 0.165, 1);
}
#root:not(:hover) .top-shadow, #root:not(:hover) .bottom-shadow, #root:not(:hover) .scroll-container .new-tab-btns::before {
display: none;
}
}
}
recipes/floating-findbar.css (панель поиска по странице вверху):
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/floating_findbar_on_top.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* This style makes findbar appear as floating box at the top-left of the content area.
* If you want the findbar on right side instead then create a new pref
* userchrome.floating-findbar-on-right.enabled and set it to true and restart Firefox
*
* Note that privacy.resistFingerprinting.letterboxing prevents this from working properly
*/
findbar{
order: -1;
margin-bottom: -33px;
position: relative;
right: 18px;
border-top: none !important;
padding: 0 !important;
transition: transform 82ms linear, opacity 82ms linear 32ms !important;
background: none !important;
pointer-events: none;
z-index: 1;
white-space: nowrap;
}
.findbar-container > .findbar-find-fast{
padding: var(--toolbarbutton-inner-padding) 1px;
margin: 0 !important;
}
findbar[hidden]{ transform: translateY(-30px);}
findbar > .findbar-container,
findbar > .close-icon{
border: 1px solid var(--chrome-content-separator-color);
border-width: 0 0 1px 0px;
background-color: rgba(117, 190, 218, 0.8) !important;
/*background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image,none);*/
pointer-events: auto;
}
findbar > .findbar-container{
border-bottom-right-radius: 4px;
border-right-width: 1px;
height: initial !important;
margin-inline: 0px !important;
overflow-inline: visible !important;
}
.findbar-find-status{
display: flex;
overflow: hidden;
text-overflow: ellipsis;
flex-grow: 1;
}
.findbar-closebutton{
margin: 0 !important;
border-radius: 0 !important;
padding: 5px !important;
width: initial !important;
order: -1;
}
.findbar-closebutton > image{ padding: 3px }
.findbar-closebutton:hover > image{
background: var(--toolbarbutton-hover-background) !important;
border-radius: 4px
}
findbar > .findbar-container > hbox{ margin: 0 5px }
findbar::after{
content:"";
display: flex;
flex-grow: 100;
}
@media (-moz-bool-pref: "icefox.floating-findbar-on-right.enabled"),
-moz-pref("icefox.floating-findbar-on-right.enabled"){
findbar{
flex-direction: row-reverse;
}
findbar > .findbar-container{
/*flex-direction: row-reverse;*/
border-inline-width: 1px 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 4px;
}
/*
Move findbar so it isn't over the scrollbar
Delete if you want findbar to begin from right window edge
*/
findbar{
margin-right: 16px;
border-right: 1px solid var(--chrome-content-separator-color);
}
findbar description.findbar-label:empty {
display: none;
}
findbar [anonid=findbar-textbox-wrapper] {
order: 1;
}
findbar checkbox[anonid=highlight] {
order: 2;
}
findbar checkbox[anonid=find-case-sensitive] {
order: 3;
}
findbar checkbox[anonid=find-match-diacritics] {
order: 4;
}
findbar checkbox[anonid=find-entire-word] {
order: 5;
}
findbar label.findbar-label {
order: 6;
}
findbar description.findbar-label {
order: 0;
}
}