diff --git a/src/compatibility/_os.scss b/src/compatibility/_os.scss index 9fa7c5e..52ee851 100644 --- a/src/compatibility/_os.scss +++ b/src/compatibility/_os.scss @@ -24,10 +24,14 @@ } } +//-- Mixin --------------------------------------------------------------------- @mixin _os_winTabBarTextColor { /* background textcolor */ color: var(--lwt-text-color) !important; } + +//------------------------------------------------------------------------------ + @include OS($win7) { #TabsToolbar { &:-moz-lwtheme { @@ -81,6 +85,7 @@ } } +//-- Mixin --------------------------------------------------------------------- @mixin _os_menuEmulate($bgRate, $bdRate) { menu[_moz-menuactive="true"], menuitem[_moz-menuactive="true"] { @@ -93,6 +98,9 @@ } } } + +//------------------------------------------------------------------------------ + @include OS($win7) { @include _os_menuEmulate(5%, 60%); @@ -140,6 +148,7 @@ } /*= Linux - Light System Default Theme's Selected Tab ========================*/ +//-- Mixin --------------------------------------------------------------------- $_os_linuxDefaultShadow: 0 0 4px rgba(128, 128, 142, 0.5); @mixin _os_linuxDefaultThemeSelectedTab { #tabbrowser-tabs:not([noshadowfortests]) @@ -149,6 +158,9 @@ $_os_linuxDefaultShadow: 0 0 4px rgba(128, 128, 142, 0.5); @content; } } + +//------------------------------------------------------------------------------ + @include OS($linux) { @include Light { /* Because of diff --git a/src/decoration/_animate.scss b/src/decoration/_animate.scss index 8c7035a..25997a7 100644 --- a/src/decoration/_animate.scss +++ b/src/decoration/_animate.scss @@ -1,4 +1,5 @@ /*- Background Color -------------------------------------------------------*/ +//-- Mixin --------------------------------------------------------------------- @mixin _animate_bgColor($duration, $presudo: "") { button#{$presudo}, toolbarbutton#{$presudo}, @@ -9,6 +10,9 @@ transition: background-color $duration var(--animation-easing-function) !important; } } + +//------------------------------------------------------------------------------ + @include _animate_bgColor(1s); @include _animate_bgColor(0.25s, ":hover"); @include OS($linux) { diff --git a/src/library/_contents_menu.scss b/src/library/_contents_menu.scss index 74c7f22..a11e506 100644 --- a/src/library/_contents_menu.scss +++ b/src/library/_contents_menu.scss @@ -4,6 +4,7 @@ menupopup menu:not([type="checkbox"], [type="radio"]), -moz-appearance: none !important; /* Linux: menulist */ } +//-- Mixin --------------------------------------------------------------------- @function _library_iconTargetSelector($target: "menu") { // .menu-iconic, .menuitem-iconic: Alreay exist, not target. // .in-menulist: Not a range because it is a select menu of web content. @@ -32,6 +33,8 @@ $_library_menuSelector: _library_iconTargetSelector("menu"); } } +//------------------------------------------------------------------------------ + @include _library_contextMenu { /* Color */ -moz-context-properties: fill, fill-opacity !important; diff --git a/src/padding/_drag_space.scss b/src/padding/_drag_space.scss index 7602622..2cfa38e 100644 --- a/src/padding/_drag_space.scss +++ b/src/padding/_drag_space.scss @@ -4,7 +4,8 @@ --space-above-tabbar: 8px; /* If the option is not specified, it is equivalent to 0px. */ } -@mixin dragSpaceHeight { +//-- Mixin --------------------------------------------------------------------- +@mixin _dragSpaceHeight { :root[tabsintitlebar][sizemode="normal"] #toolbar-menubar[autohide="true"] { @content; } @@ -14,7 +15,7 @@ } } } -@mixin dragSpacePadding { +@mixin _dragSpacePadding { /* Add extra space to titlebar for dragging */ :root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar > .toolbar-items, :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar > .toolbar-items { @@ -28,13 +29,15 @@ } } +//------------------------------------------------------------------------------ + @include OS($win10) { - @include dragSpaceHeight { + @include _dragSpaceHeight { height: calc(var(--tab-min-height) + var(--space-above-tabbar) - var(--tabs-navbar-shadow-size)); } } @include OS($win7, $win8, $linux) { - @include dragSpaceHeight { + @include _dragSpaceHeight { height: calc(var(--tab-min-height) + var(--space-above-tabbar)); } } @@ -46,12 +49,12 @@ } @include OS($win7) { /* Add 4px extra margin on top of the tabs toolbar on Windows 7. */ - @include dragSpacePadding { + @include _dragSpacePadding { padding-top: calc(var(--space-above-tabbar) + 4px) !important; } } @include OS($win8, $win10, $linux) { - @include dragSpacePadding { + @include _dragSpacePadding { padding-top: var(--space-above-tabbar) !important; } } diff --git a/src/tabbar/clipped_tab/_pinned_close_button.scss b/src/tabbar/clipped_tab/_pinned_close_button.scss index e5f2b1d..7f49852 100644 --- a/src/tabbar/clipped_tab/_pinned_close_button.scss +++ b/src/tabbar/clipped_tab/_pinned_close_button.scss @@ -8,6 +8,7 @@ --uc-close-button-padding: 4px; } +//-- Mixin --------------------------------------------------------------------- @mixin pinnedCloseButtonShow($prefix: "") { #{$prefix}:not([busy]) .tab-close-button { display: -moz-box !important; @@ -33,6 +34,8 @@ } } +//------------------------------------------------------------------------------ + .tabbrowser-tab[pinned] { @include pinnedCloseButtonShow("&[visuallyselected]:not([style*='transform: translateX']):hover"); @include pinnedIconStackLayout("&[visuallyselected]:not([style*='transform: translateX']):hover"); diff --git a/src/tabbar/unselected_tab/_dynamic_separator.scss b/src/tabbar/unselected_tab/_dynamic_separator.scss index e80c7ef..9633b1b 100644 --- a/src/tabbar/unselected_tab/_dynamic_separator.scss +++ b/src/tabbar/unselected_tab/_dynamic_separator.scss @@ -1,4 +1,5 @@ -@mixin separatorShape() { +//-- Mixin --------------------------------------------------------------------- +@mixin _dynamicSeparatorShape() { /* Box Model */ content: ""; display: block; @@ -20,6 +21,8 @@ } } +//------------------------------------------------------------------------------ + @include Option("userChrome.tab.newtab_button_like_tab") { #tabbrowser-arrowscrollbox { position: absolute; @@ -27,7 +30,7 @@ .tab-background::before, #tabs-newtab-button::before { - @include separatorShape; + @include _dynamicSeparatorShape; /* More position */ transform: translateX(-2.5px) translateY(calc(-50% + 1px)); @@ -39,7 +42,7 @@ #tabbrowser-arrowscrollbox:not([overflowing]) .tabbrowser-tab:not([visuallyselected], [multiselected], :hover)[last-visible-tab] .tab-background::after { - @include separatorShape; + @include _dynamicSeparatorShape; } .tab-background::before {