Skip to main content

userChrome.css

注意

userChrome.css 文件目录为 $FIREFOX_PROFILE/chrome/ 目录,该目录需手动创建。

  • Windows

C:\Users\ADMIN\AppData\Mozilla\Firefox\Profiles\XXXXXXXX.your_profile_name\chrome\userChrome.css

  • Linux

~/.mozilla/firefox/XXXXXXXX.your_profile_name/chrome/userChrome.css

  • Mac

~/Library/Application Support/Firefox/Profiles/XXXXXXXX.your_profile_name/chrome/userChrome.css

/* 工具栏下边框 */
toolbox#navigator-toolbox {
border-bottom: 0.01px solid transparent !important;
}

/* 标签背景色 */
.tabbrowser-tab:not(:hover)>.tab-stack>.tab-background:not([selected], [multiselected]) {
background-color: color-mix(in srgb, currentColor 8%, transparent) !important;
}

.tabbrowser-tab:hover>.tab-stack>.tab-background:not([selected], [multiselected]) {
background-color: color-mix(in srgb, currentColor 16%, transparent) !important;
}

/* 标签关闭按钮总是显示 */
#TabsToolbar #tabbrowser-tabs .tabbrowser-tab:not([pinned]) .tab-close-button {
visibility: visible !important;
display: block !important;
}

#TabsToolbar #tabbrowser-tabs .tabbrowser-tab:not([pinned])[faviconized="true"] .tab-close-button {
visibility: collapse !important;
display: none !important;
}

/* 隐藏 firefox-view 按钮 */
#TabsToolbar #firefox-view-button {
display: none !important;
}

/* 隐藏标签起始处(左侧)分隔线 */
:root:not([privatebrowsingmode], [firefoxviewhidden]) :is(toolbarbutton, toolbarpaletteitem) + #tabbrowser-tabs,
:root:not([privatebrowsingmode="temporary"]) :is(toolbarbutton, toolbarpaletteitem) + #tabbrowser-tabs, :root[privatebrowsingmode="temporary"] :is(toolbarbutton:not(#firefox-view-button), toolbarpaletteitem:not(#wrapper-firefox-view-button)) + #tabbrowser-tabs {
border-inline-start: none !important;
padding-inline-start: 0 !important;
margin-inline-start: 0 !important;
}

/* 隐藏标签下拉按钮(所有标签) */
#TabsToolbar #alltabs-button.toolbarbutton-1 {
margin: 0 !important;
display: none !important;
}

/* 隐藏页面操作按钮(不含缩放按钮) */
hbox#page-action-buttons > hbox {
display: none !important;
}

/* 滚动条 */
* {
scrollbar-color: rgba(125, 125, 125, 0.5) transparent !important;
scrollbar-width: thin !important;
}

/* 全局边框 */
* {
outline: none !important;
}

/* 全局超链接去下划线 */
a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
text-decoration: none !important;
}

/* 全局 Yao 字体 */
*:not([class*="icon"]),
::placeholder {
font-family: 'YaoAscii', 'YaoSans', 'YaoIcon' !important;
}