Last active
February 10, 2023 09:58
-
-
Save notpushkin/48fac7ce3206228e5bdb5614a0308b55 to your computer and use it in GitHub Desktop.
Australis-like tabs for Lepton (https://github.com/black7375/Firefox-UI-Fix / https://waterfox.net/ default theme)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tabbrowser-tab { | |
--tab-corner-rounding: 30px; | |
--toolbar-color: transparent; | |
overflow: visible !important; | |
} | |
/* Fix left curve display on first tab */ | |
#tabbrowser-arrowscrollbox:not([overflowing="true"]) .titlebar-spacer { | |
margin-inline-end: -15px; | |
} | |
#tabbrowser-arrowscrollbox:not([overflowing="true"]) .tabbrowser-tab:first-child::before { | |
content: ""; | |
display: inline-block; | |
width: 15px; | |
} | |
.tab-context-line { | |
opacity: 0 !important; | |
visibility: hidden; | |
} | |
/* Roundings shouldn't capture hover */ | |
.tabbrowser-tab > stack::before, | |
.tabbrowser-tab > stack::after { | |
pointer-events: none; | |
} | |
.tabbrowser-tab[visuallyselected] > stack::before { | |
left: -15px !important; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.065 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.065 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.065 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.065 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-start)'><div id='tab-background-fill' style='background-color:%232b2a33;background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>") !important; | |
} | |
.tabbrowser-tab[visuallyselected] > stack::after { | |
right: -15px !important; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.065 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.065 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.065 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.065 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-end)'><div id='tab-background-fill' style='background-color:%232b2a33;background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>") !important; | |
} | |
.tabbrowser-tab:hover:not([visuallyselected]) > stack::before, | |
.tabbrowser-tab:hover:not([visuallyselected]) > stack::after { | |
content: "" !important; | |
display: block !important; | |
position: absolute !important; | |
z-index: 1 !important; | |
width: var(--tab-corner-rounding) !important; | |
height: 100% !important; | |
background-size: var(--tab-corner-rounding); | |
background-repeat: no-repeat; | |
background-position-y: bottom; | |
} | |
.tabbrowser-tab:hover:not([visuallyselected]) > stack::before { | |
left: -15px !important; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.065 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.065 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.065 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.065 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-start)'><div id='tab-background-fill' style='background-color:%2335343a;background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>") !important; | |
} | |
.tabbrowser-tab:hover:not([visuallyselected]) > stack::after { | |
right: -15px !important; | |
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.065 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.065 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.065 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.065 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-end)'><div id='tab-background-fill' style='background-color:%2335343a;background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>") !important; | |
} | |
/* Show content above the curves */ | |
.tabbrowser-tab:hover .tab-content, | |
.tabbrowser-tab[visuallyselected] .tab-content { | |
z-index: 2; | |
} | |
/* Active tab background shouldn't overlap the curves */ | |
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"], [multiselected]), | |
.tab-background[selected="true"]:-moz-lwtheme { | |
background-size: calc(100% - 30px) 29px !important; | |
background-repeat: no-repeat !important; | |
background-position: 15px bottom !important; | |
} | |
.tab-background[selected="true"]:-moz-lwtheme { | |
background-image: linear-gradient(#2b2a33, #2b2a33), none, none !important; | |
} | |
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"], [multiselected]) { | |
background-color: transparent !important; | |
background-image: linear-gradient(#35343a, #35343a), none, none !important; | |
} | |
/* Shorter separators */ | |
.tab-background::after { | |
height: 50%; | |
} | |
/* Don't display separator before the tabs */ | |
.tab-background::before { | |
display: none; | |
} | |
/* Hide separators around hovered tab */ | |
.tabbrowser-tab[beforehovered="true"] > .tab-stack > .tab-background::after, | |
.tabbrowser-tab:hover > .tab-stack > .tab-background::after { | |
opacity: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment