自用火狐外观样式 userChrome.css

阅读:1650回复:3
2024-04-21 22:09
写私信
楼主#
/*========================================================================自动隐藏书签栏=======================*/
/* 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. */
 
#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 */
   
  /* 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 */
}
 
:root[uidensity="compact"] #PersonalToolbar{ --uc-bm-padding: 1px; }
:root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 7px }
 
#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: #161F25 !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;
}
 
#PlacesToolbarItems > .bookmark-item,
#OtherBookmarks,
#PersonalToolbar > #import-button{
  padding-block: var(--uc-bm-padding) !important;
}
 
#nav-bar:#PersonalToolbar{
  transition-delay: 100ms !important;
  transform: rotateX(var(--uc-autohide-toolbar-focus-rotation,0));
}
 
#navigator-toolbox:hover > #PersonalToolbar{
  transition-delay: 100ms !important;
  transform: rotateX(var(--uc-autohide-toolbar-hover-rotation,0));
}
 
#navigator-toolbox:hover > #nav-bar:#PersonalToolbar {  
  transform: rotateX(0);
}
 
/* 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;
}
*/
/*=====================================================================================标签栏==========*/
/*隐藏标签栏左右空白*/
.titlebar-spacer { display: none !important; }
/*---去掉标题栏顶部1px---*/
#tabbrowser-tabs{margin-top:-4px !important;}
/*当前标签显示关闭按钮*/
.tabbrowser-tab:not([selected]) .tab-close-button{display:none!important;}
/*非当前页关闭按钮自动隐藏*/
.tabbrowser-tab:not([pinned]):hover .tab-close-button{display:inherit!important;}
/*隐藏标签栏与工具栏之间的黑线*/
#nav-bar{ border: none !important }
/*==标签计数==*/
#main-window {counter-reset: tabs;}
.tabbrowser-tab:not(:-moz-any([pinned],[concealed])) {counter-increment: tabs;}
#alltabs-button {visibility: visible!important;}
#alltabs-button:after {
    content: counter(tabs);
    font-size: 16pt !important;
    display: -moz-box;}
#alltabs-button > :-moz-any(label, image) {display: none;}
#alltabs-button menuitem {max-width: 200px !important;}
/*====================================================================================工具栏调整========*/
/*地址栏到顶部距离*/
#TabsToolbar {margin-bottom: -3px !important;}
/*固定搜索栏最大宽度*/
#search-container, #searchbar
{max-width:490px !important;} 
/*隐藏地址栏书签图标*/
#star-button-box{
  margin-inline: calc((16px + var(--urlbar-icon-padding) * 2) / -2) !important;
  opacity: 0;
  pointer-events: none;
}
/*===========================================================================隐藏右键菜单================*/
#context-navigation,/*四个按钮*/
#context-sep-navigation/*分割线-------------*/
{ display:none !important; }
 
/*===========================================================================最小化,最大化,关闭========*/
/*最小化,最大化,关闭的间距大小*/
.titlebar-button{ padding-inline: 12px !important; }
/* 最小化,最大化,关闭 形状 圆形 Custom min-max-close Buttons */
.titlebar-button {
    transition: all 0.3s ease !important;
    padding: 8px 10px !important;
     
}
.titlebar-button > .toolbarbutton-icon {
    transition: all 0.3s ease !important;
    list-style-image: none;
  border: 1px solid;
    border-radius: 10px;
}
.titlebar-button.titlebar-min > .toolbarbutton-icon {
    background: #27c840 !important;
  border-color: #27c83f7a !important;
}
 
.titlebar-button.titlebar-max > .toolbarbutton-icon,
.titlebar-button.titlebar-restore > .toolbarbutton-icon {
    background: #febb2e !important;
  border-color: #febc2e7c !important;
}
 
.titlebar-button.titlebar-close > .toolbarbutton-icon {
    background: #ff5f57 !important;
    stroke: #ff5f57 !important;
  border-color: #ff5f5777 !important;
   
}
.titlebar-button.titlebar-close:hover > .toolbarbutton-icon {
    background: #ff5f5742 !important;
  border: 1px solid;
  border-color: #ff5f57 !important;
}
.titlebar-button.titlebar-close:hover {
    background: #fdfdfd00 !important;
}
.titlebar-button.titlebar-max:hover > .toolbarbutton-icon,
.titlebar-button.titlebar-restore:hover > .toolbarbutton-icon {
    background: #febc2e44 !important;
  border: 1px solid;
  border-color: #febb2e !important;
}
.titlebar-button.titlebar-max:hover, .titlebar-button.titlebar-restore:hover {
    background: #fdfdfd00 !important;
}
.titlebar-button.titlebar-min:hover > .toolbarbutton-icon {
    background: #27c83f38 !important;
  border: 1px solid;
  border-color: #27c840 !important;
}
.titlebar-button.titlebar-min:hover {
    background: #fdfdfd00 !important;
}


有需要的可以参考下【适用版本可用126.0b3 (64 位)】
2024-05-03 06:34
写私信
1楼#
发个预览图看看啊
My Technical Blog: http://art-technical.blogspot.com/
2024-05-10 10:50
写私信
2楼#
三个控制按钮跟菜单按钮没对齐 强迫症受不了
2024-05-10 20:30
写私信
3楼#
藉无棱:三个控制按钮跟菜单按钮没对齐 强迫症受不了回到原帖
但是那样的话,和上边右边的间距又不一样了啊,更丑吧