From 00fb0e70cba72efc2c2f50d515b6e6f6358d0496 Mon Sep 17 00:00:00 2001 From: TGSAN Date: Tue, 25 Jul 2023 00:29:06 +0800 Subject: [PATCH] Add more space between tabs, change floating tabs browser-frame-bgcolor value to lwt-accent-color, make rounded corners not default, hide the separator of adjacent tabs, remove active tab bold --- README.md | 18 ++++++++++-------- chrome/global/browser.css | 4 ++-- chrome/global/tweaks.css | 10 ---------- chrome/toolbar/navbar.css | 2 +- chrome/toolbar/tabbar.css | 9 +++++++-- 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4fb04e9..24bbb4c 100644 --- a/README.md +++ b/README.md @@ -56,15 +56,17 @@ To disable a tweak, set the key to `false` or delete it, then restart the browse | ----------------------------- | | `uc.tweak.disable-drag-space` | -| disable rounded corners | -| ---------------------------------- | -| `uc.tweak.disable-rounded-corners` | +| enable rounded corners | +| -------------------------- | +| `uc.tweak.rounded-corners` | -| enable Edge style floating tabs | -| -------------------------------------------------------------- | -| `uc.tweak.floating-tabs` | -| **OPTIONAL: Make the top and bottom margins of the tab equal** | -| `uc.tweak.floating-tabs.equal-margin` | +| enable Edge style floating tabs | +| ---------------------------------------------------------------------------------------------------------------- | +| `uc.tweak.floating-tabs` | +| **OPTIONAL1: Make the top and bottom margins of the tab equal** | +| `uc.tweak.floating-tabs.equal-margin` | +| **OPTIONAL2: Hide the separator of adjacent tabs (need to wait for Firefox support, or forced enable with bug)** | +| `layout.css.has-selector.enabled` | | enable Mica toolbar background *(Windows 11 only)* | | ------------------------------------------------------------------- | diff --git a/chrome/global/browser.css b/chrome/global/browser.css index 26326be..b5572ae 100644 --- a/chrome/global/browser.css +++ b/chrome/global/browser.css @@ -2,7 +2,7 @@ @supports (-moz-bool-pref("uc.tweak.floating-tabs")) { :root { - --browser-frame-bgcolor: transparent; + --browser-frame-bgcolor: var(--lwt-accent-color); } } @@ -12,7 +12,7 @@ } } -@supports (not -moz-bool-pref("uc.tweak.disable-rounded-corners")) { +@supports (-moz-bool-pref("uc.tweak.rounded-corners")) { :root #browser>#appcontent { margin: 0px 3px 3px 3px; border-radius: 8px; diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index f63250c..e9550f1 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -89,16 +89,6 @@ bugs with certain themes eg. dark text on dark background.) */ outline-offset: -1px !important; } - .tabbrowser-tab[selected] .tab-label { - font-weight: 500 !important; - } - - @media (-moz-platform: windows) { - .tabbrowser-tab[selected] .tab-label { - font-weight: 600 !important; - } - } - /* adjust spacing of area above tabs */ @media not (-moz-platform: macos) { :root[sizemode="maximized"] #titlebar { diff --git a/chrome/toolbar/navbar.css b/chrome/toolbar/navbar.css index 3a2299e..cb6aba3 100644 --- a/chrome/toolbar/navbar.css +++ b/chrome/toolbar/navbar.css @@ -27,7 +27,7 @@ padding: var(--toolbarbutton-inner-padding) var(--uc-toolbarbutton-inner-inline-padding) !important; } -@supports (not -moz-bool-pref("uc.tweak.disable-rounded-corners")) { +@supports (-moz-bool-pref("uc.tweak.rounded-corners")) { #navigator-toolbox { border-bottom: none !important; } diff --git a/chrome/toolbar/tabbar.css b/chrome/toolbar/tabbar.css index 886d2f0..50ffcda 100644 --- a/chrome/toolbar/tabbar.css +++ b/chrome/toolbar/tabbar.css @@ -315,7 +315,7 @@ toolbarbutton[part="scrollbutton-down"] { /* tab separators */ .tabbrowser-tab:not([last-visible-tab="true"]) { - margin-inline-end: -1px !important; + margin-inline-end: 3px !important; } .tabbrowser-tab:not([selected="true"], :hover, [beforeselected-visible], [beforehovered]) .tab-stack::after { @@ -323,11 +323,16 @@ toolbarbutton[part="scrollbutton-down"] { position: absolute; display: block; height: 20px; - right: 0; + right: -1px; top: 6px; border-right: 1px solid color-mix(in srgb, currentColor 34%, transparent); } +/* need layout.css.has-selector.enabled */ +.tabbrowser-tab:has(+ .tabbrowser-tab:is([selected="true"], :hover, [beforeselected-visible], [beforehovered])) .tab-stack::after { + display: none; +} + #tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])>#tabbrowser-arrowscrollbox>.tabbrowser-tab[first-visible-unpinned-tab] { margin-inline-start: 0 !important; }