diff --git a/src/tabbar/_bottom_rounded_corner.scss b/src/tabbar/_bottom_rounded_corner.scss new file mode 100644 index 0000000..1ed3f26 --- /dev/null +++ b/src/tabbar/_bottom_rounded_corner.scss @@ -0,0 +1,61 @@ +#tabbrowser-tabs { + --tab-corner-rounding: 3px; /* 10px looks about like chromium - 17px looks close to Australis tabs */ + --tab-corner-padding: 0px; + --tab-corner-position: calc(var(--tab-corner-padding) - var(--tab-corner-rounding)); +} + +:root:not([customizing="true"]) tab[visuallyselected] > stack::before, +:root:not([customizing="true"]) tab[visuallyselected] > stack::after { + content: "" !important; + + /* Box */ + display: block !important; + position: absolute !important; + z-index: 1 !important; + + /* Shape */ + width: var(--tab-corner-rounding) !important; + height: 100% !important; + + /* Color */ + fill: var(--toolbar-bgcolor) !important; + stroke: var(--tab-line-color, var(--tabs-border-color, rgba(128, 128, 142, 0.9))) !important; + -moz-context-properties: fill, stroke !important; + + /* Image */ + background-size: var(--tab-corner-rounding); + background-repeat: no-repeat; + background-position-y: bottom; +} +:root:not([customizing="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::before, +:root:not([customizing="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::after { + /* As Selected Tab - Box Shadow */ + stroke: var(--toolbar-color) !important; +} + +tab[visuallyselected] > stack::before { + left: var(--tab-corner-position) !important; + background-image: url("./icons/tab-bottom-corner-left.svg"); +} +tab[visuallyselected] > stack::after { + left: auto; + right: var(--tab-corner-position); + background-image: url("./icons/tab-bottom-corner-right.svg"); +} + +@include OS($linux) { + /* Fill color for GTK */ + :root:not([customizing="true"]):not([lwtheme="true"]) tab[visuallyselected] > stack::before, + :root:not([customizing="true"]):not([lwtheme="true"]) tab[visuallyselected] > stack::after { + /* As GTK Toolbar's background-color + backround-image + * --toolbar-non-lwt-bgcolor: -moz-dialog; + * --toolbar-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15)); + */ + fill: color-mix(in srgb, rgb(255, 255, 255) 15%, -moz-dialog) !important; + stroke: transparent !important; + } + :root:not([customizing="true"]):not([lwtheme="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::before, + :root:not([customizing="true"]):not([lwtheme="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::after { + stroke: transparent !important; + } +} diff --git a/src/userChrome.scss b/src/userChrome.scss index e850907..1cdec96 100644 --- a/src/userChrome.scss +++ b/src/userChrome.scss @@ -47,67 +47,7 @@ @import "tabbar/box_shadow"; /** Selected Tab - Bottom Rounded Corner **************************************/ -#tabbrowser-tabs { - --tab-corner-rounding: 3px; /* 10px looks about like chromium - 17px looks close to Australis tabs */ - --tab-corner-padding: 0px; - --tab-corner-position: calc(var(--tab-corner-padding) - var(--tab-corner-rounding)); -} - -:root:not([customizing="true"]) tab[visuallyselected] > stack::before, -:root:not([customizing="true"]) tab[visuallyselected] > stack::after { - content: "" !important; - - /* Box */ - display: block !important; - position: absolute !important; - z-index: 1 !important; - - /* Shape */ - width: var(--tab-corner-rounding) !important; - height: 100% !important; - - /* Color */ - fill: var(--toolbar-bgcolor) !important; - stroke: var(--tab-line-color, var(--tabs-border-color, rgba(128, 128, 142, 0.9))) !important; - -moz-context-properties: fill, stroke !important; - - /* Image */ - background-size: var(--tab-corner-rounding); - background-repeat: no-repeat; - background-position-y: bottom; -} -:root:not([customizing="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::before, -:root:not([customizing="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::after { - /* As Selected Tab - Box Shadow */ - stroke: var(--toolbar-color) !important; -} - -tab[visuallyselected] > stack::before { - left: var(--tab-corner-position) !important; - background-image: url("./icons/tab-bottom-corner-left.svg"); -} -tab[visuallyselected] > stack::after { - left: auto; - right: var(--tab-corner-position); - background-image: url("./icons/tab-bottom-corner-right.svg"); -} - -@include OS($linux) { - /* Fill color for GTK */ - :root:not([customizing="true"]):not([lwtheme="true"]) tab[visuallyselected] > stack::before, - :root:not([customizing="true"]):not([lwtheme="true"]) tab[visuallyselected] > stack::after { - /* As GTK Toolbar's background-color + backround-image - * --toolbar-non-lwt-bgcolor: -moz-dialog; - * --toolbar-non-lwt-bgimage: linear-gradient(rgba(255,255,255,.15), rgba(255,255,255,.15)); - */ - fill: color-mix(in srgb, rgb(255, 255, 255) 15%, -moz-dialog) !important; - stroke: transparent !important; - } - :root:not([customizing="true"]):not([lwtheme="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::before, - :root:not([customizing="true"]):not([lwtheme="true"]) #TabsToolbar[brighttext] tab[visuallyselected] > stack::after { - stroke: transparent !important; - } -} +@import "tabbar/bottom_rounded_corner"; /** Unselected Tab - Divide line **********************************************/ #tabbrowser-arrowscrollbox {