Skip to content

Commit

Permalink
fix corner radius on floating tabs tweak #128
Browse files Browse the repository at this point in the history
  • Loading branch information
bmFtZQ committed Jan 6, 2024
1 parent 4ee6df2 commit 773deab
Showing 1 changed file with 4 additions and 100 deletions.
104 changes: 4 additions & 100 deletions chrome/global/tweaks.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 773deab

Please sign in to comment.