377 lines
9.8 KiB
CSS
Raw Normal View History

2021-10-11 00:52:35 +08:00
/* Tabs bar */
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
:root {
--space-above-tabbar: 0 !important;
}
/* Tabs bar height */
2024-09-01 17:09:45 +08:00
#TabsToolbar {
min-height: 32px !important;
}
2024-11-30 21:45:49 +08:00
#TabsToolbar #tabbrowser-tabs,
#TabsToolbar #tabbrowser-tabs arrowscrollbox {
2024-09-01 17:09:45 +08:00
min-height: 32px !important;
--tab-min-height: 32px !important;
}
#tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container {
max-height: 32px !important;
2022-11-12 01:06:59 +08:00
}
2024-11-30 21:45:49 +08:00
#TabsToolbar .tab-background,
#TabsToolbar .tab-stack {
2024-09-01 17:09:45 +08:00
height: 32px !important;
min-height: 32px !important;
2021-10-11 00:52:35 +08:00
}
2024-11-30 21:45:49 +08:00
#TabsToolbar tab > stack {
2024-12-01 00:04:30 +08:00
margin: 6px 3px !important;
2021-10-11 00:52:35 +08:00
}
2021-10-11 10:58:02 +08:00
:root:not([sizemode="normal"]) .titlebar-spacer[type="pre-tabs"], :root[gtktiledwindow="true"] .titlebar-spacer[type="pre-tabs"] { /* reset */
display: flex !important;
}
#TabsToolbar .titlebar-spacer {
2021-10-11 00:52:35 +08:00
width: 8px !important;
}
.tab-background {
border: none !important;
box-shadow: none !important;
2024-12-01 00:04:30 +08:00
}
#TabsToolbar .tabbrowser-tab,
#TabsToolbar .tab-background {
2021-10-11 00:52:35 +08:00
border-radius: 8px !important;
padding: 0 !important;
background-image: none !important;
}
.tabbrowser-tab:not([visuallyselected="true"], [multiselected]), .tabbrowser-tab:-moz-lwtheme {
color: var(--gnome-tabbar-tab-color) !important;
}
.tabbrowser-tab .tab-background:not([selected=true]) {
color: var(--gnome-tabbar-tab-active-color) !important;
}
2024-11-30 21:45:49 +08:00
#TabsToolbar .tab-background {
2022-01-13 17:46:58 +08:00
margin: 0 !important;
2024-08-31 16:58:31 +08:00
transition: none;
2022-01-13 17:46:58 +08:00
margin-block: 0 !important;
2021-10-11 00:52:35 +08:00
}
2024-08-31 16:58:31 +08:00
.tab-background:hover,
.tab-background:is([selected]) {
transition: background 200ms;
}
2024-11-30 21:45:49 +08:00
.tabbrowser-tab:not([selected=true]) .tab-background {
2021-10-11 00:52:35 +08:00
background: var(--gnome-tabbar-tab-background) !important;
}
2024-11-30 21:45:49 +08:00
.tabbrowser-tab:not([selected=true]) .tab-background:-moz-window-inactive {
2021-10-11 00:52:35 +08:00
background: var(--gnome-inactive-tabbar-tab-background) !important;
}
/* Tab hover */
2024-11-30 21:45:49 +08:00
.tabbrowser-tab:not([selected=true]):hover > .tab-stack > .tab-background {
2021-10-11 00:52:35 +08:00
background: var(--gnome-tabbar-tab-hover-background) !important;
}
/* Active tab */
2023-10-26 01:31:19 +08:00
.tab-background:is([selected]) {
2021-10-11 00:52:35 +08:00
background: var(--gnome-tabbar-tab-active-background) !important;
2023-04-11 14:22:56 +08:00
animation: none !important;
transition: none !important;
2021-10-11 00:52:35 +08:00
}
2023-10-26 01:31:19 +08:00
.tab-background:is([selected]):-moz-window-inactive {
2021-10-11 00:52:35 +08:00
background: var(--gnome-inactive-tabbar-tab-active-background) !important;
}
2023-05-11 17:08:03 +08:00
/* Tab labels */
tab .tab-label {
color: var(--gnome-tabbar-tab-color) !important;
}
tab:hover .tab-label {
color: var(--gnome-tabbar-tab-hover-color) !important;
}
tab[selected] .tab-label {
color: var(--gnome-tabbar-tab-active-color) !important;
}
tab:-moz-window-inactive .tab-label {
color: var(--gnome-inactive-tabbar-tab-color) !important;
}
tab[selected]:-moz-window-inactive .tab-label {
color: var(--gnome-inactive-tabbar-tab-active-color) !important;
}
2021-10-11 00:52:35 +08:00
/* Center all inside tab */
2024-11-30 21:45:49 +08:00
#TabsToolbar {
2021-10-11 00:52:35 +08:00
.tab-content {
display: flex;
flex-direction: row;
2023-05-11 17:08:03 +08:00
justify-content: center !important;
align-items: center !important;
2021-10-11 00:52:35 +08:00
min-width: 100% !important;
2024-09-11 00:28:18 +08:00
padding: 0 8px !important;
2021-10-11 00:52:35 +08:00
}
2023-05-11 17:08:03 +08:00
.tab-label {
margin-inline: 0 !important;
}
2021-10-11 00:52:35 +08:00
/* Adjust tab label width */
.tab-label-container {
min-width: 0 !important;
2023-05-11 17:08:03 +08:00
max-width: min-content !important;
2021-10-11 00:52:35 +08:00
}
/* Put tab close button and icon sound to the right */
.tab-icon-sound[soundplaying="true"], .tab-icon-sound[muted="true"],
.tab-icon-sound[activemedia-blocked="true"] {
margin-left: auto !important;
}
/*.tabbrowser-tab:not([soundplaying]):not([muted]):not([activemedia-blocked]) .tab-close-button {*/
/* margin-left: auto !important;*/
/*}*/
.tab-icon-sound {
margin-right: 6px;
}
/* Force tab favicon to the center */
.tab-throbber, .tab-throbber-fallback,
2023-04-11 14:22:56 +08:00
.tabbrowser-tab:not([busy]):not([soundplaying="true"],[muted="true"]) .tab-icon-image,
2021-10-11 00:52:35 +08:00
.tabbrowser-tab:not([class*="identity-color-"]) .tab-icon-stack {
margin-left: auto !important;
}
/* separate class for multi-tab alignment*/
.tabbrowser-tab[class*="identity-color-"] > .tab-stack > .tab-content > .tab-icon-stack {
margin-left: auto !important;
}
/* If tab favicon is not present, force tab label to the center */
.tabbrowser-tab .tab-label-container {
margin-left: 0 !important;
margin-right: auto !important;
}
.tabbrowser-tab:not([image]):not([busy]):not([progress]) .tab-label-container {
margin-left: auto !important;
}
/* Fix website with no favicon centred text */
.tabbrowser-tab:not([image]) .tab-icon-overlay:not([pinned], [sharing], [crashed]) .tab-icon-stack {
margin-left: 0 !important
}
.tabbrowser-tab:not([image], [busy]) .tab-icon-stack {
margin-left: 0 !important
}
2024-11-30 21:45:49 +08:00
/* Prevent tab icons size breaking */
.tab-icon-image, .tab-icon-sound, .tab-throbber, .tab-throbber-fallback, .tab-close-button {
min-width: 16px;
}
.tabbrowser-tab[soundplaying="true"] .tab-icon-image,
.tabbrowser-tab[muted="true"] .tab-icon-image {
margin-top: 3px !important;
margin-left: 2px !important;
}
.tab-icon-overlay {
height: 24px !important;
width: 24px !important;
padding: 4px !important;
border-radius: 100px !important;
}
.tab-icon-overlay:not([crashed]):is([pinned], [sharing]) {
top: 0 !important;
inset-inline-end: 0 !important;
}
2022-01-13 17:46:58 +08:00
/*Align personal bookmarks v89 */
#personal-bookmarks {
-moz-box-align: center !important;
}
2021-10-11 00:52:35 +08:00
2022-01-13 17:46:58 +08:00
/* fix misc spacing between tabs */
.tabbrowser-tab {
padding-inline: 0px !important;
2021-10-11 00:52:35 +08:00
}
2024-11-30 21:45:49 +08:00
}
.tabbrowser-tab .tab-icon-overlay:not([crashed]):is([pinned], [sharing]) {
background-color: var(--gnome-tabbar-tab-background) !important;
}
.tabbrowser-tab[selected=true] .tab-icon-overlay:not([crashed]):is([pinned], [sharing]) {
background-color: var(--gnome-tabbar-tab-active-background) !important;
}
.tabbrowser-tab .tab-icon-overlay:not([crashed]):is([pinned], [sharing]):hover {
background-color: var(--gnome-tabbar-tab-hover-background) !important;
}
2021-10-11 00:52:35 +08:00
.close-icon {
height: 16px !important;
width: 16px !important;
2024-09-01 17:09:45 +08:00
padding: 0 !important;
2021-10-11 00:52:35 +08:00
}
.tab-close-button {
-moz-appearance: none !important;
margin-inline-end: 0 !important;
border: none !important;
box-sizing: content-box; /* Avoid deformation on flexbox */
border-radius: 3px !important;
list-style-image: url("../icons/window-close-symbolic.svg") !important;
height: 16px;
opacity: .3;
padding: 0;
width: 16px;
}
.tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button {
visibility: hidden;
}
.tabbrowser-tab:hover > .tab-stack > .tab-content > .tab-close-button {
visibility: visible;
}
:root:-moz-window-inactive .tab-close-button:not(#hack) {
opacity: .18 !important;
}
:root:not(:-moz-window-inactive) .tab-close-button:hover {
background-color: var(--gnome-button-hover-color) !important;
border: none !important;
opacity: 1;
}
:root:not(:-moz-window-inactive) .tab-close-button:active {
background-color: var(--gnome-button-active-color) !important;
}
.tab-close-button:active:not(:hover) {
background-image: none !important;
box-shadow: none !important;
}
/* Tab close button etc. positioning */
.tab-throbber, .tab-icon-image, .tab-sharing-icon-overlay, .tab-icon-sound, .tab-close-button {
margin-top: 0 !important;
}
/* Remove blue line above tabs */
.tab-line {
display: none;
}
/* Remove tab separators */
.tabbrowser-tab::after,
.tabbrowser-tab::before {
border-color: transparent !important;
border-image: none !important;
}
2023-06-12 11:28:13 +08:00
/* Tab attention dot */
.tabbrowser-tab:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected="true"]), .tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]), #firefox-view-button[attention] {
background-image: radial-gradient(circle, var(--gnome-tab-attention-icon-color), var(--gnome-tab-attention-icon-color) 2px, transparent 2px) !important;
background-position: center bottom 3px !important;
background-size: 4px 4px;
background-repeat: no-repeat;
}
2021-10-11 00:52:35 +08:00
/* Full width tabs */
.tabbrowser-tab:not([style^="max-width"]):not([pinned]),
.tabbrowser-tab[style^="max-width: 100px !important;"]:not([pinned]) {
max-width: 100% !important;
}
.tabbrowser-tab:not([style^="max-width"]):not([pinned]):not([fadein]),
.tabbrowser-tab[style^="max-width: 100px !important;"]:not([pinned]):not([fadein]) {
max-width: .1px !important;
}
2021-10-12 11:15:38 +08:00
/* Remove alt colours references for multi tabs*/
2021-10-11 00:52:35 +08:00
.tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-bottom-line {
display: none;
}
2021-10-12 11:15:38 +08:00
.tabbrowser-tab[class*="identity-color-"][pinned] {
display: flex;
}
2021-10-11 00:52:35 +08:00
#TabsToolbar #alltabs-button {
2024-04-21 13:50:19 +08:00
padding: 0 !important;
2021-10-11 00:52:35 +08:00
visibility: collapse !important;
}
#TabsToolbar .toolbarbutton-1,
2024-11-30 21:45:49 +08:00
#TabsToolbar #tabs-newtab-button,
#TabsToolbar #new-tab-button {
2024-09-01 17:09:45 +08:00
min-height: 32px !important;
2024-12-01 00:04:30 +08:00
margin: 6px 2px !important;
2021-10-11 00:52:35 +08:00
padding: 0 10px !important;
2022-11-12 01:06:59 +08:00
border-radius: 8px !important;
2021-10-11 00:52:35 +08:00
}
#TabsToolbar .toolbarbutton-1 image,
2024-11-30 21:45:49 +08:00
#TabsToolbar #tabs-newtab-button image,
2024-04-21 13:50:19 +08:00
#TabsToolbar #new-tab-button image {
2021-10-11 00:52:35 +08:00
margin: 0 !important;
padding: 0 !important;
height: 16px !important;
width: 16px !important;
}
2024-04-21 13:50:19 +08:00
#TabsToolbar #scrollbutton-up,
#TabsToolbar #scrollbutton-down {
2024-09-01 17:09:45 +08:00
height: 32px !important;
2021-10-11 00:52:35 +08:00
}
2024-04-21 13:50:19 +08:00
#TabsToolbar #scrollbutton-up image,
#TabsToolbar #scrollbutton-down image {
2021-10-11 00:52:35 +08:00
margin: 0 !important;
padding: 0 !important;
height: 16px !important;
width: 16px !important;
}
2022-11-12 01:06:59 +08:00
/* firefox-view-button */
2024-04-21 13:50:19 +08:00
:root:not([privatebrowsingmode], [firefoxviewhidden]) :is(toolbarbutton, toolbarpaletteitem) + #tabbrowser-tabs,
:root[privatebrowsingmode]:not([firefoxviewhidden]) :is(
toolbarbutton:not(#firefox-view-button),
toolbarpaletteitem:not(#wrapper-firefox-view-button)
) + #tabbrowser-tabs {
border-inline-start: none !important;
padding-inline-start: calc(var(--tab-overflow-pinned-tabs-width)) !important;
margin-inline-start: 0 !important;
2022-11-12 01:06:59 +08:00
}
#firefox-view-button {
border-radius: 8px !important;
background: var(--gnome-tabbar-tab-background) !important;
}
#firefox-view-button:hover {
background: var(--gnome-tabbar-tab-hover-background) !important;
}
#firefox-view-button:checked, #firefox-view-button:active {
background: var(--gnome-tabbar-tab-active-background) !important;
}
#firefox-view-button > .toolbarbutton-icon {
box-shadow: none !important;
}