Skip to content

Commit

Permalink
Fix: Separator - Dyniamic's margin adjust, Static's accent color provide
Browse files Browse the repository at this point in the history
  • Loading branch information
black7375 committed Nov 7, 2022
1 parent 7350823 commit 3a5800a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 27 deletions.
20 changes: 11 additions & 9 deletions css/leptonChrome.css
Original file line number Diff line number Diff line change
Expand Up @@ -6428,7 +6428,7 @@
}
}
/*= Selected Tab - Photon like contextline ===================================*/
@supports -moz-bool-pref("userChrome.tab.photon_like_contextline") {
@supports -moz-bool-pref("userChrome.tab.photon_like_contextline") or -moz-bool-pref("userChrome.tab.static_separator") {
:root[lwtheme-mozlightdark] #tabbrowser-tabs,
:root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"],
:root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] {
Expand All @@ -6441,6 +6441,8 @@
/* -moz-accent-color */
}
}
}
@supports -moz-bool-pref("userChrome.tab.photon_like_contextline") {
.tab-context-line {
display: -moz-inline-box !important;
height: 2px !important;
Expand Down Expand Up @@ -6668,6 +6670,14 @@
.tab-background::before {
opacity: 0 !important;
}

:root:not([uidensity="compact"]) #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 2px;
}

:root[uidensity="compact"] #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 1px;
}
}
/* Animate */
@media (prefers-reduced-motion: no-preference) {
Expand Down Expand Up @@ -6848,14 +6858,6 @@
:root:not([uidensity="touch"]) #tabs-newtab-button > .toolbarbutton-icon {
--toolbarbutton-inner-padding: calc((var(--tab-min-height) - 16px) / 2 - 1px);
}

:root:not([uidensity="compact"]) #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 2px;
}

:root[uidensity="compact"] #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 1px;
}
}
/*= Unloaded Tab - Contents Opacity ===========================================*/
@supports -moz-bool-pref("userChrome.tab.unloaded") {
Expand Down
13 changes: 13 additions & 0 deletions src/tab/_selected_tab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
}

/*= Selected Tab - Photon like contextline ===================================*/
@include Option("userChrome.tab.photon_like_contextline", "userChrome.tab.static_separator") {
:root[lwtheme-mozlightdark] #tabbrowser-tabs, /* Legacy: v96 */
:root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"],
:root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] {
--tab-line-color: rgb(10, 132, 255) !important;
}
@media (-moz-gtk-csd-available) {
:root:not(:-moz-lwtheme) #tabbrowser-tabs {
--tab-line-color: Highlight !important; /* -moz-accent-color */
}
}
}

@include Option("userChrome.tab.photon_like_contextline") {
@import "selected_tab/photon_like_contextline";
}
7 changes: 0 additions & 7 deletions src/tab/newtab_button/_proton_like_button.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
:root:not([uidensity="touch"]) #tabs-newtab-button > .toolbarbutton-icon {
--toolbarbutton-inner-padding: calc((var(--tab-min-height) - 16px) / 2 - 1px);
}

:root:not([uidensity="compact"]) #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 2px;
}
:root[uidensity="compact"] #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 1px;
}
11 changes: 0 additions & 11 deletions src/tab/selected_tab/_photon_like_contextline.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
:root[lwtheme-mozlightdark] #tabbrowser-tabs, /* Legacy: v96 */
:root[style*="--lwt-accent-color: rgb(240, 240, 244); --lwt-text-color: rgba(21, 20, 26);"],
:root[style*="--lwt-accent-color: rgb(28, 27, 34); --lwt-text-color: rgba(251, 251, 254);"] {
--tab-line-color: rgb(10, 132, 255) !important;
}
@media (-moz-gtk-csd-available) {
:root:not(:-moz-lwtheme) #tabbrowser-tabs {
--tab-line-color: Highlight !important; /* -moz-accent-color */
}
}

.tab-context-line {
display: -moz-inline-box !important;
height: 2px !important;
Expand Down
7 changes: 7 additions & 0 deletions src/tab/unselected_tab/_dynamic_separator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@
.tab-background::before {
opacity: 0 !important;
}

:root:not([uidensity="compact"]) #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 2px;
}
:root[uidensity="compact"] #tabs-newtab-button > .toolbarbutton-icon {
margin-left: 1px;
}
}

/* Animate */
Expand Down

0 comments on commit 3a5800a

Please sign in to comment.