From 773deaba064a5e2468c7ec101142964ed87153c4 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:34:07 +0800 Subject: [PATCH] fix corner radius on floating tabs tweak #128 --- chrome/global/tweaks.css | 104 ++------------------------------------- 1 file changed, 4 insertions(+), 100 deletions(-) diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index cacf9ce..b881e29 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -28,11 +28,9 @@ bugs with certain themes eg. dark text on dark background.) */ @media (-moz-bool-pref: "uc.tweak.floating-tabs") { :root:not(:-moz-lwtheme), - /* `--newtab-background-color-secondary used` to differentiate between a dark - * private window and private window with the 'Dark' theme enabled. - * May not be the most reliable method, but works for now up to FF 123. - */ + * private window and private window with the 'Dark' theme enabled. + * May not be the most reliable method, but works for now up to FF 123. */ :root[privatebrowsingmode="temporary"][style*="--lwt-accent-color: rgb(28, 27, 34)"]:not([style*="--newtab-background-color-secondary: rgb(66, 65, 77)"]) { --lwt-accent-color: light-dark(#f3f3f3, #202020) !important; --lwt-accent-color-inactive: unset !important; @@ -70,7 +68,7 @@ bugs with certain themes eg. dark text on dark background.) */ --uc-tab-shadow: 0 2px 3px rgb(0 0 0 / .12); } - & #titlebar { + & #TabsToolbar { --tab-border-radius: 8px !important; } } @@ -119,7 +117,7 @@ bugs with certain themes eg. dark text on dark background.) */ } /* IMPORTANT: Adds padding and removes margin on top of tabs to allow user to - select it from the top edge of the window */ + * select it from the top edge of the window */ #tabbrowser-tabs { margin-top: calc(var(--uc-tab-top-margin) - 4px) !important; @@ -196,100 +194,6 @@ bugs with certain themes eg. dark text on dark background.) */ } } -@media (-moz-bool-pref: "uc.tweak.hide-tabs-bar") { - :root:not([customizing]) { - /* Height of navbar, used for determining height and position of window controls */ - --uc-navbar-height: 38px; - /* Drag space next to the window controls, allows you to move the window more easily */ - --uc-titlebar-drag-space: 40px; - - @media not (-moz-bool-pref: "uc.tweak.hide-tabs-bar.only-when-maximised") { - /* Set containing block for the window buttons */ - & #titlebar { - position: relative !important; - } - - /* Hide the tabs */ - & #TabsToolbar { - visibility: collapse !important; - } - - /* Add some padding to the top of the navbar */ - &[tabsintitlebar] #nav-bar { - padding-top: var(--uc-tab-top-margin, 0) !important; - } - } - - /* macOS specific positioning */ - @media (-moz-platform: macos) { - &[inFullscreen] { - /* Hide the tabs */ - & #TabsToolbar { - visibility: collapse !important; - } - } - - @media not (-moz-bool-pref: "uc.tweak.hide-tabs-bar.only-when-maximised") { - /* Offset navbar contents to make space for the window controls */ - &[tabsintitlebar] #nav-bar:not([inFullscreen]) { - padding-left: calc(70px + var(--uc-titlebar-drag-space)) !important; - - /* Remove the padding from the side of the navbar */ - & #nav-bar-customization-target > :is(toolbarbutton, toolbaritem):first-child { - padding-inline-start: 0 !important; - } - } - - /* Positioning of the window controls */ - #TabsToolbar .titlebar-buttonbox-container { - visibility: visible !important; - position: fixed !important; - height: calc(var(--uc-navbar-height) + var(--uc-tab-top-margin, 0px)); - margin: 0 !important; - top: 0; - left: 0; - - & .titlebar-buttonbox { - margin-inline: calc((var(--uc-navbar-height) + var(--uc-tab-top-margin, 0px) - 14px) / 2) !important; - } - } - } - } - - /* Windows specific positioning */ - @media (-moz-platform: windows) { - /* Offset navbar contents to make space for the window controls */ - &:where([inFullscreen], [tabsintitlebar]) #nav-bar { - padding-right: calc(140px + var(--uc-titlebar-drag-space)) !important; - - /* Remove the padding from the side of the navbar */ - & #PanelUI-menu-button { - padding-inline-end: 0 !important; - } - } - - /* Positioning of the window controls */ - & #toolbar-menubar[inactive] + #TabsToolbar .titlebar-buttonbox { - visibility: visible !important; - position: fixed !important; - top: 0; - right: 0; - height: calc(var(--uc-navbar-height) + var(--uc-tab-top-margin, 0)) !important; - z-index: 3 !important; - color: var(--toolbar-color) !important; - } - - /* Set background colour of the menu bar to maintain consistency with the navbar */ - @media not (-moz-bool-pref: "uc.tweak.floating-tabs") { - #toolbar-menubar { - background-color: var(--toolbar-bgcolor) !important; - color: var(--toolbar-color) !important; - } - } - } - } -} - @media (-moz-bool-pref: "uc.tweak.hide-forward-button") { :root:not([customizing]) #forward-button[disabled] { display: none !important;