diff --git a/css/leptonChrome.css b/css/leptonChrome.css index 1bccfa0..11b4889 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -5374,6 +5374,19 @@ } } } +@supports -moz-bool-pref("userChrome.sidebar.hidden_header") { + @supports not -moz-bool-pref("userChrome.sidebar.hidden_header.vertical_tab_only") { + #sidebar-header { + display: none !important; + } + } + @supports -moz-bool-pref("userChrome.sidebar.hidden_header.vertical_tab_only") { + #sidebar-box:is([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"], [sidebarcommand="tabcenter-reborn_ariasuni-sidebar-action"]) + #sidebar-header { + display: none !important; + } + } +} /** Other UI ******************************************************************/ /*= Bookmark Bar - Centered ==================================================*/ @supports -moz-bool-pref("userChrome.bookmarkbar.centered") { diff --git a/src/sidebar/_hidden.scss b/src/sidebar/_hidden.scss new file mode 100644 index 0000000..94f6001 --- /dev/null +++ b/src/sidebar/_hidden.scss @@ -0,0 +1,14 @@ +@include NotOption("userChrome.sidebar.hidden_header.vertical_tab_only") { + #sidebar-header { + display: none !important; + } +} + +@include Option("userChrome.sidebar.hidden_header.vertical_tab_only") { + #sidebar-box:is( + [sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"], + [sidebarcommand="tabcenter-reborn_ariasuni-sidebar-action"] + ) #sidebar-header { + display: none !important; + } +} diff --git a/src/sidebar/_index.scss b/src/sidebar/_index.scss new file mode 100644 index 0000000..27c61d0 --- /dev/null +++ b/src/sidebar/_index.scss @@ -0,0 +1,5 @@ +@import "overlap"; + +@include Option("userChrome.sidebar.hidden_header") { + @import "hidden"; +} diff --git a/src/sidebar/_overlap.scss b/src/sidebar/_overlap.scss new file mode 100644 index 0000000..59c0a22 --- /dev/null +++ b/src/sidebar/_overlap.scss @@ -0,0 +1,45 @@ +@include Option("userChrome.sidebar.overlap", "userChrome.autohide.sidebar") { + #sidebar-box { + /* Original + min-width: 14em; + width: 18em; + max-width: 36em; + */ + + --uc-sidebar-width: 40px; + --uc-sidebar-activate-width: 18em; + --uc-sidebar-fullscreen-width: 4px; + --uc-sidebar-shadow-color: #28282F; + --uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */ + + z-index: 1000 !important; + position: relative !important; + + box-shadow: 1px 0px 15px -10px var(--uc-sidebar-shadow-color); + } + + #sidebar-splitter { + display: none !important; + } +} + +@include Option("userChrome.sidebar.overlap") { + @include NotOption("userChrome.autohide.sidebar") { + #sidebar-box { + min-width: var(--uc-sidebar-activate-width) !important; + max-width: var(--uc-sidebar-activate-width) !important; + margin-inline-start: calc(-1 * var(--uc-sidebar-activate-width)) !important; + + will-change: transform; + + &:not([hidden="true"]) { + transform: translateX(var(--uc-sidebar-activate-width)); + } + + @include Animate { + transition: transform 0.25s var(--animation-easing-function), opacity 0.25s ease-in-out, + visibility 0s linear !important; + } + } + } +} diff --git a/user.js b/user.js index fbaa1f5..6d46603 100644 --- a/user.js +++ b/user.js @@ -116,6 +116,8 @@ user_pref("userChrome.tab.bottom_rounded_corner", true); // user_pref("userChrome.panel.full_width_separator", true); // user_pref("userChrome.panel.full_width_padding", true); +// user_pref("userChrome.sidebar.hidden_header", true); +// user_pref("userChrome.sidebar.hidden_header.vertical_tab_only", true); // user_pref("userChrome.sidebar.overlap", true); // user_pref("userChrome.icon.account_image_to_right", true);