459 lines
12 KiB
CSS
Raw Normal View History

2020-07-31 14:11:26 +08:00
/* Tabs bar */
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
2021-06-03 14:15:17 +08:00
:root {
--space-above-tabbar: 0 !important;
}
2020-07-31 14:11:26 +08:00
#TabsToolbar {
2024-11-30 21:45:49 +08:00
/* Remove hover effects on tab bar buttons */
2020-07-31 14:11:26 +08:00
--toolbarbutton-active-background: transparent !important;
--toolbarbutton-hover-background: transparent !important;
2023-05-29 01:18:28 +08:00
padding: 0 !important;
2020-12-22 17:38:59 +08:00
box-shadow: inset 0 1px var(--gnome-toolbar-border-color), inset 0 1px 3px rgba(0, 0, 0, 0.08) !important;
2020-07-31 14:11:26 +08:00
/* New hover effect */
2024-11-30 21:45:49 +08:00
toolbarbutton {
2020-07-31 14:11:26 +08:00
fill-opacity: .6 !important;
}
2024-11-30 21:45:49 +08:00
toolbarbutton:not([disabled]):hover,
toolbarbutton[open=true] {
2020-07-31 14:11:26 +08:00
fill-opacity: 1 !important;
}
2024-11-30 21:45:49 +08:00
/* Tabs bar height */
#tabbrowser-tabs {
--tab-min-height: 32px !important;
--tabstrip-min-height: 32px !important;
}
.tab-background, .tab-stack {
min-height: 32px !important;
}
#tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container {
max-height: 32px !important;
}
.toolbar-items {
margin-bottom: -1px !important;
}
2020-07-31 14:11:26 +08:00
/* Remove shadow next to tab scroll buttons */
.arrowscrollbox-overflow-start-indicator,
.arrowscrollbox-overflow-end-indicator {
display: none;
}
/* Remove tab separators */
.tabbrowser-tab::after,
.tabbrowser-tab::before {
border-color: transparent !important;
border-image: none !important;
}
2023-06-11 17:57:14 +08:00
/* Tabs separators */
.tabbrowser-tab {
border-left: 1px solid transparent !important;
}
.tabbrowser-tab + .tabbrowser-tab:not([selected], :hover) {
2024-08-31 16:58:31 +08:00
border-color: var(--gnome-tabbar-tab-border-color) !important;
2023-06-11 17:57:14 +08:00
}
.tabbrowser-tab[selected] + .tabbrowser-tab,
2023-06-13 01:08:37 +08:00
.tabbrowser-tab:hover + .tabbrowser-tab {
2023-06-11 17:57:14 +08:00
border-color: transparent !important;
}
2023-06-13 01:08:37 +08:00
.tabbrowser-tab:first-of-type {
border-left: none !important;
}
2020-07-31 14:11:26 +08:00
/* Space between tabs */
2023-10-27 03:34:27 +08:00
.tabbrowser-tab:not([pinned]) {
2022-11-12 01:06:59 +08:00
margin: 0 !important;
2020-07-31 14:11:26 +08:00
}
/* Center all inside tab */
.tab-content {
display: flex;
2021-09-02 12:20:17 +08:00
flex-direction: row;
2023-05-11 00:56:43 +08:00
justify-content: center !important;
align-items: center !important;
2023-05-27 22:03:16 +08:00
min-width: 44px !important;
2023-08-28 22:44:03 +08:00
min-height: 32px !important;
padding: 0 8px !important;
2020-07-31 14:11:26 +08:00
}
2023-05-11 00:56:43 +08:00
/* Fix custom info tab icon */
.tabbrowser-tab[image="chrome://global/skin/icons/info.svg"]:not([pinned]):not([busy]):not([progress]) .tab-icon-stack::before {
margin-inline-end: 5.5px;
}
2020-07-31 14:11:26 +08:00
/* Prevent tab icons size breaking */
.tab-icon-image, .tab-icon-sound, .tab-throbber, .tab-throbber-fallback, .tab-close-button {
min-width: 16px;
}
2023-05-11 00:56:43 +08:00
/* Center tab text */
.tab-label {
2023-05-11 17:08:03 +08:00
margin-inline: 0 !important;
2023-05-11 00:56:43 +08:00
}
2020-07-31 14:11:26 +08:00
/* Adjust tab label width */
.tab-label-container {
min-width: 0 !important;
2023-05-27 22:03:16 +08:00
}
2023-05-30 01:05:16 +08:00
2023-05-27 22:03:16 +08:00
.tabbrowser-tab:not([pinned]) .tab-label-container {
2023-05-11 17:08:03 +08:00
max-width: min-content !important;
2020-07-31 14:11:26 +08:00
}
2023-05-30 01:05:16 +08:00
.tabbrowser-tab[pinned] .tab-label-container {
display: none !important;
}
2023-05-11 00:56:43 +08:00
.tab-throbber:not([pinned]), .tab-icon-pending:not([pinned]), .tab-icon-image:not([pinned]), .tab-sharing-icon-overlay:not([pinned]), .tab-icon-overlay:not([pinned]) {
margin-inline-end: 0 !important;
}
2023-05-11 17:08:03 +08:00
2023-05-11 00:56:43 +08:00
.tabbrowser-tab:not([soundplaying], [muted], [activemedia-blocked], [crashed]) .tab-icon-stack {
padding: 6px;
}
/* Hide secondary label about muting */
.tabbrowser-tab:is([soundplaying], [muted], [activemedia-blocked], [crashed]) .tab-secondary-label {
display: none;
}
2020-07-31 14:11:26 +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;
}
2021-09-02 12:20:17 +08:00
/*.tabbrowser-tab:not([soundplaying]):not([muted]):not([activemedia-blocked]) .tab-close-button {*/
/* margin-left: auto !important;*/
/*}*/
2020-07-31 14:11:26 +08:00
.tab-icon-sound {
margin-right: 6px;
}
/* Force tab favicon to the center */
2021-04-28 18:47:09 +08:00
.tab-throbber, .tab-throbber-fallback,
2024-08-25 10:18:09 +08:00
.tabbrowser-tab:not([busy]):not([muted="true"]) .tab-icon-image,
2023-05-11 17:08:03 +08:00
.tabbrowser-tab .tab-icon-stack {
2021-05-30 23:36:04 +10:00
margin-left: auto !important;
}
2024-08-25 10:18:09 +08:00
.tabbrowser-tab:is([pinned]) .tab-icon-stack {
margin-left: 0 !important;
}
.tabbrowser-tab:not([busy]):not([muted="true"]) .tab-icon-stack .tab-icon-image {
margin: auto !important;
}
2021-04-29 16:58:23 +08:00
/* If tab favicon is not present, force tab label to the center */
2021-05-30 23:36:04 +10:00
.tabbrowser-tab .tab-label-container {
margin-left: 0 !important;
2021-09-02 12:20:17 +08:00
margin-right: auto !important;
2021-05-30 23:36:04 +10:00
}
2021-04-28 18:47:09 +08:00
2021-05-30 23:36:04 +10:00
.tabbrowser-tab:not([image]):not([busy]):not([progress]) .tab-label-container {
margin-left: auto !important;
}
2021-05-30 22:31:14 +08:00
/* 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
}
2022-01-13 17:46:58 +08:00
/*Align personal bookmarks v89 */
#personal-bookmarks {
-moz-box-align: center !important;
}
2021-05-30 22:31:14 +08:00
2022-01-13 17:46:58 +08:00
/* fix misc spacing between tabs */
.tabbrowser-tab {
2023-05-11 17:08:03 +08:00
padding-inline: 0 !important;
2023-05-11 00:56:43 +08:00
padding: 0 !important;
2022-01-13 17:46:58 +08:00
}
2021-05-30 22:31:14 +08:00
2023-04-11 00:21:16 +08:00
.tabbrowser-tab[selected="true"] > .tab-stack > .tab-background {
2022-01-13 17:46:58 +08:00
margin-left: 0px !important;
margin-right: 0px !important;
}
/* centre text when audio is playing */
.tabbrowser-tab:is([soundplaying]) .tab-label-container {
margin-left: 0 !important;
margin-right: auto !important
2021-05-30 22:31:14 +08:00
}
2025-02-03 19:17:38 +08:00
/* Tabs */
.tab-background {
transition: background-color 200ms;
border-radius: 0 !important;
margin-block: 0 !important;
outline: none !important;
}
2024-11-30 21:45:49 +08:00
/* Tab hover */
.tabbrowser-tab:not([selected=true]):hover .tab-background {
background-color: var(--gnome-tabbar-tab-hover-background) !important;
border-image: none !important;
box-shadow: inset 0 1px var(--gnome-tabbar-tab-hover-border-color), inset 0 -1px var(--gnome-tabbar-tab-hover-border-color) !important;
}
/* Active tab */
.tab-background:is([selected]) {
background-color: var(--gnome-tabbar-tab-active-background) !important;
background-image: none !important;
border: none !important;
border-image: none !important;
transition: none !important;
margin-left: -1px !important;
margin-right: -1px !important;
border-radius: 0 !important;
box-shadow: 1px 0 var(--gnome-tabbar-tab-active-border-color), 1px 0 3px rgba(0, 0, 0, 0.08),
-1px 0 var(--gnome-tabbar-tab-active-border-color), -1px 0 3px rgba(0, 0, 0, 0.08),
inset 0 -1px var(--gnome-tabbar-tab-active-border-color) !important;
}
.tab-background:is([selected]):-moz-window-inactive {
background-color: var(--gnome-inactive-tabbar-tab-active-background) !important;
border-image: none !important;
}
/* Tabs scroll buttons */
#scrollbutton-up:not([disabled]):hover,
#scrollbutton-down:not([disabled]):hover {
background: var(--gnome-tabbar-tab-active-hover-background) !important;
}
/* 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;
}
/* Remove blank spaces on tabs start and end */
.titlebar-spacer {
display: none !important;
}
/* TabsToolbar buttons */
.toolbarbutton-1 {
margin: 0 !important;
border-radius: 0 !important;
min-width: 32px !important;
min-height: 32px !important;
padding: 0 !important;
border: none !important;
}
.toolbarbutton-1 > .toolbarbutton-icon,
.toolbarbutton-1 > .toolbarbutton-text,
.toolbarbutton-1 > .toolbarbutton-badge-stack {
padding: 8px !important;
}
.toolbarbutton-1 > .toolbarbutton-icon {
width: 32px !important;
height: 32px !important;
}
#alltabs-button {
display: none !important;
}
}
:root[tabsintitlebar][inFullscreen] #TabsToolbar .toolbar-items {
margin-bottom: 0 !important;
}
/* Tab labels */
tab {
color: var(--gnome-tabbar-tab-color) !important;
}
tab:hover {
color: var(--gnome-tabbar-tab-hover-color) !important;
}
tab[selected] {
color: var(--gnome-tabbar-tab-active-color) !important;
}
tab:-moz-window-inactive {
color: var(--gnome-inactive-tabbar-tab-color) !important;
}
tab[selected]:-moz-window-inactive {
color: var(--gnome-inactive-tabbar-tab-active-color) !important;
}
2020-07-31 14:11:26 +08:00
/* Close tab button */
2021-04-21 22:37:22 +08:00
.close-icon {
height: 16px !important;
padding: 0 !important;
width: 16px !important;
}
2020-07-31 14:11:26 +08:00
.tab-close-button {
-moz-appearance: none !important;
2021-06-03 14:15:17 +08:00
margin-inline-end: 0 !important;
2020-07-31 14:11:26 +08:00
border: none !important;
box-sizing: content-box; /* Avoid deformation on flexbox */
2021-06-03 14:15:17 +08:00
border-radius: 3px !important;
2020-07-31 14:11:26 +08:00
list-style-image: url("../icons/window-close-symbolic.svg") !important;
height: 16px;
opacity: .3;
padding: 0;
width: 16px;
}
2021-06-03 14:15:17 +08:00
2021-09-02 12:20:17 +08:00
.tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button {
visibility: hidden;
}
.tabbrowser-tab:hover > .tab-stack > .tab-content > .tab-close-button {
visibility: visible;
}
2020-07-31 14:11:26 +08:00
: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;
}
2023-04-11 14:22:56 +08:00
.tabbrowser-tab[soundplaying="true"] .tab-icon-image,
.tabbrowser-tab[muted="true"] .tab-icon-image {
2023-04-11 00:21:16 +08:00
margin-top: 3px !important;
2023-04-11 14:22:56 +08:00
margin-left: 2px !important;
}
.tab-icon-overlay {
height: 24px !important;
width: 24px !important;
padding: 4px !important;
border-radius: 100px !important;
2023-04-11 00:21:16 +08:00
}
.tab-icon-overlay:not([crashed]):is([pinned], [sharing]) {
top: 0 !important;
inset-inline-end: 0 !important;
}
2024-08-25 10:18:09 +08:00
.tabbrowser-tab:not(:hover) .tab-icon-overlay:not([crashed]):is([pinned], [sharing]) {
display: none !important;
}
2024-12-01 19:52:19 +08:00
.tabbrowser-tab .tab-icon-overlay:not([crashed]):is([soundplaying], [muted], [activemedia-blocked]) {
2023-04-11 00:21:16 +08:00
background-color: var(--gnome-tabbar-tab-background) !important;
}
2024-12-01 19:52:19 +08:00
.tabbrowser-tab[selected=true] .tab-icon-overlay:not([crashed]):is([soundplaying], [muted], [activemedia-blocked]) {
2023-04-11 00:21:16 +08:00
background-color: var(--gnome-tabbar-tab-active-background) !important;
}
2024-12-01 19:52:19 +08:00
.tabbrowser-tab .tab-icon-overlay:not([crashed]):is([soundplaying], [muted], [activemedia-blocked]):hover {
2023-04-11 00:21:16 +08:00
background-color: var(--gnome-tabbar-tab-hover-background) !important;
}
2020-07-31 14:11:26 +08:00
/* Remove blue line above tabs */
.tab-line {
display: none;
}
2024-12-01 11:49:13 +08:00
/* tab-context-line above tabs */
.tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-context-line {
height: 2px;
border-radius: 0 !important;
margin: 0 !important;
}
/* Remove alt colours references for multi tabs*/
.tabbrowser-tab[usercontextid] > .tab-stack > .tab-background > .tab-bottom-line {
display: none;
}
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-05-30 23:36:04 +10:00
.tabbrowser-tab[class*="identity-color-"][pinned] {
display: flex;
}
2022-11-12 01:06:59 +08:00
/* firefox-view-button */
2024-03-31 06:39:57 -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: 1px solid var(--gnome-toolbar-border-color) !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
}
2024-03-31 06:39:57 -08:00
#TabsToolbar #firefox-view-button {
2022-11-12 01:06:59 +08:00
border-radius: 0 !important;
2024-03-31 06:39:57 -08:00
padding: 0 4px !important;
2022-11-12 01:06:59 +08:00
}
#firefox-view-button > .toolbarbutton-icon {
box-shadow: none !important;
}
2023-10-27 03:34:27 +08:00
#TabsToolbar #firefox-view-button[open] {
background-color: var(--gnome-tabbar-tab-active-background) !important;
box-shadow: inset 0 -1px var(--gnome-toolbar-border-color) !important;
}
2024-02-18 21:12:37 +08:00
#TabsToolbar #firefox-view-button[open]:-moz-window-inactive {
background-color: var(--gnome-inactive-tabbar-tab-active-background) !important;
}
2021-05-30 23:36:04 +10:00
/* fix pip on small displays */
.tab-icon-overlay[pictureinpicture] {
top: 3px !important;
inset-inline-end: 13px !important;
z-index: 1 !important;
max-width: 10px;
max-height: 10px;
}
/* fix spacing on too many tabs */
.tab-icon-overlay:not([pinned], [sharing]),
[pictureinpicture] {
margin-inline-end: 4px !important;
margin-inline-start: 4px !important;
}