Skip to content

Commit

Permalink
Clean: Tab - Static separator use --toolbarseparator-color as dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Nov 27, 2022
1 parent 9204e1c commit 87d7b47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
11 changes: 6 additions & 5 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -6120,6 +6120,9 @@
}
/*= Unselected Tab - Static Separator ========================================*/
@supports -moz-bool-pref("userChrome.tab.static_separator") {
#TabsToolbar {
--toolbarseparator-color: color-mix(in srgb, currentColor 30%, transparent);
}
.tabbrowser-tab[first-visible-tab="true"] .tab-background::before,
.tab-background::after {
content: "";
Expand All @@ -6131,13 +6134,12 @@
position: absolute;
/* Position */
top: 50%;
transform: translateY(-50%) !important;
transform: translateY(-50%);
/* Bar shape */
width: 0px;
height: 100%;
/* Bar Color */
opacity: 0.3;
border-right: 1px solid var(--lwt-background-tab-separator-color, currentColor) !important;
border-right: 1px solid var(--toolbarseparator-color);
}
.tab-background::after {
right: 0;
Expand All @@ -6146,8 +6148,7 @@
.tabbrowser-tab[visuallyselected] .tab-background::before,
.tabbrowser-tab[visuallyselected] .tab-background::after,
.tabbrowser-tab[beforeselected-visible] .tab-background::after {
--lwt-background-tab-separator-color: var(--tab-line-color, var(--lwt-tab-line-color, rgb(10, 132, 255)));
opacity: 1;
--toolbarseparator-color: var(--tab-line-color, var(--lwt-tab-line-color, rgb(10, 132, 255)));
}
}
@supports not -moz-bool-pref("userChrome.tab.static_separator.selected_accent") {
Expand Down
12 changes: 7 additions & 5 deletions src/tab/unselected_tab/_static_separator.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#TabsToolbar {
--toolbarseparator-color: color-mix(in srgb, currentColor 30%, transparent);
}

.tabbrowser-tab[first-visible-tab="true"] .tab-background::before,
.tab-background::after {
content: "";
Expand All @@ -11,15 +15,14 @@

/* Position */
top: 50%;
transform: translateY(-50%) !important;
transform: translateY(-50%);

/* Bar shape */
width: 0px;
height: 100%;

/* Bar Color */
opacity: 0.3;
border-right: 1px solid var(--lwt-background-tab-separator-color, currentColor) !important;
border-right: 1px solid var(--toolbarseparator-color);
}
.tab-background::after {
right: 0;
Expand All @@ -29,8 +32,7 @@
.tabbrowser-tab[visuallyselected] .tab-background::after,
.tabbrowser-tab[beforeselected-visible] .tab-background::after {
@include Option("userChrome.tab.static_separator.selected_accent") {
--lwt-background-tab-separator-color: var(--tab-line-color, var(--lwt-tab-line-color, rgb(10, 132, 255)));
opacity: 1;
--toolbarseparator-color: var(--tab-line-color, var(--lwt-tab-line-color, rgb(10, 132, 255)));
}
@include NotOption("userChrome.tab.static_separator.selected_accent") {
opacity: 0;
Expand Down

0 comments on commit 87d7b47

Please sign in to comment.