Skip to content

Commit 804cf9e

Browse files
committed
Icons, tweaks, tabs
+ Initial support for tab groups when using vertical tabs * Applied proper fix for navigation context menu entries rather than online links to the glyphs * Fixed rounded corners + immersive navbar + rounded navbar + visible sidebar compatibility * Fixed failed download button badge * Updated styles targetting the [starred] attribute
1 parent 9b43fbc commit 804cf9e

File tree

2 files changed

+128
-59
lines changed

2 files changed

+128
-59
lines changed

chrome/userChrome.css

Lines changed: 127 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,12 @@ menu::after {
817817
background: unset !important;
818818
}
819819

820+
#downloads-button[attention="warning"]{
821+
list-style-image: none !important;
822+
background: none !important;
823+
fill: transparent !important;
824+
}
825+
820826
#downloads-button[attention="warning"]::before {
821827
content: '';
822828
height: 16px;
@@ -827,6 +833,7 @@ menu::after {
827833
position: absolute;
828834
border-radius: 99px;
829835
animation: findbarOut 333ms cubic-bezier(0.55, 0.55, 0, 1) !important;
836+
display: block !important;
830837
}
831838
#downloads-button[attention="warning"]::after {
832839
content: '';
@@ -841,7 +848,7 @@ menu::after {
841848
z-index: 9;
842849
display: block;
843850
position: absolute;
844-
animation: drawLeft 1s cubic-bezier(0.55, 0.55, 0, 1);
851+
animation: findbarOut 333ms cubic-bezier(0.55, 0.55, 0, 1) !important;
845852
}
846853

847854
/* Password icons */
@@ -996,21 +1003,6 @@ menuitem[command="placesCmd_sortBy:name"] .menu-text::after {
9961003
height: 16px;
9971004
}
9981005

999-
/* Use web links until the local path method is found */
1000-
#context-back {
1001-
--menuitem-icon: url(https://raw.githubusercontent.com/Lockframe/Firefox-WinUI/refs/heads/main/chrome/icons/back.svg) !important;
1002-
}
1003-
#context-forward {
1004-
--menuitem-icon: url(https://raw.githubusercontent.com/Lockframe/Firefox-WinUI/refs/heads/main/chrome/icons/forward.svg) !important;
1005-
}
1006-
#context-reload {
1007-
--menuitem-icon: url(https://raw.githubusercontent.com/Lockframe/Firefox-WinUI/refs/heads/main/chrome/icons/reload.svg) !important;
1008-
}
1009-
#context-bookmarkpage {
1010-
--menuitem-icon: unset !important;
1011-
}
1012-
1013-
10141006
/* =========================================== */
10151007

10161008
/* Active tab with semibold text */
@@ -4221,12 +4213,9 @@ menupopup#ContentSelectDropdownPopup, menuitem {
42214213
#context-navigation {
42224214
#context-back, #context-forward, #context-reload, #context-stop {
42234215
padding-inline: 3px 0 !important;
4224-
4225-
.menuitem-iconic {
4226-
list-style-image: url(icons/mail.svg) !important;
4227-
}
4216+
42284217
&::after {
4229-
margin-inline: -7px 0 !important;
4218+
margin-inline: 9px 0 !important;
42304219
}
42314220
}
42324221
}
@@ -4238,6 +4227,24 @@ menupopup#ContentSelectDropdownPopup, menuitem {
42384227
}
42394228
}
42404229

4230+
/* Remove default navigation icons from context menu */
4231+
#context-back, #context-forward, #context-reload, #context-stop, #context-bookmarkpage {
4232+
--menuitem-icon: unset !important;
4233+
}
4234+
4235+
#context-back, #context-forward, #context-reload, #context-stop {
4236+
background-size: 16px !important;
4237+
background-position: 10px center !important;
4238+
background-repeat: no-repeat !important;
4239+
margin-inline: 32px !important;
4240+
-moz-context-properties: fill !important;
4241+
fill: var(--textPrimary);
4242+
}
4243+
#context-back {background-image: url(icons/back.svg) !important;}
4244+
#context-forward {background-image: url(icons/forward.svg) !important;}
4245+
#context-reload {background-image: url(icons/reload.svg) !important;}
4246+
#context-stop {background-image: url(icons/close.svg) !important;}
4247+
42414248
#context-navigation :is(menu, menuitem, menucaption),
42424249
:is(#context-back,#context-forward,#context-reload,#context-stop,#context-bookmarkpage) {
42434250
appearance: none !important;
@@ -5321,7 +5328,7 @@ html[windowtype="Toolkit:PictureInPicture"] {
53215328

53225329
/* URL bar icons and notification icons color */
53235330
.urlbar-icon:not(#translations-button-circle-arrows,
5324-
#translations-button[translationsactive="true"] *, #star-button[starred="true"]),
5331+
#translations-button[translationsactive="true"] *, #star-button[starred=""],#star-button[starred="true"]),
53255332
#identity-box,
53265333
#page-action-buttons{
53275334
fill-opacity: 1 !important;
@@ -6872,38 +6879,40 @@ button
68726879
}
68736880

68746881
/* Corner-rounding logic */
6875-
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"]) {
6876-
&:has(.tabbrowser-tab[pinned="true"]:first-of-type[selected="true"][visuallyselected=""]) {
6877-
& #nav-bar {
6878-
border-radius: 0 8px 0 0 !important;
6879-
&::before {
6882+
@media not -moz-pref("uc.winui.floating-tabs") {
6883+
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"]) {
6884+
&:has(.tabbrowser-tab[pinned="true"]:first-of-type[selected="true"][visuallyselected=""]) {
6885+
& #nav-bar {
68806886
border-radius: 0 8px 0 0 !important;
6887+
&::before {
6888+
border-radius: 0 8px 0 0 !important;
6889+
}
68816890
}
68826891
}
6883-
}
6884-
&:has(.tabbrowser-tab[pinned="true"]:first-of-type:not([selected="true"][visuallyselected=""])) {
6885-
& #nav-bar {
6886-
border-radius: 8px 8px 0 0 !important;
6887-
&::before {
6892+
&:has(.tabbrowser-tab[pinned="true"]:first-of-type:not([selected="true"][visuallyselected=""])) {
6893+
& #nav-bar {
68886894
border-radius: 8px 8px 0 0 !important;
6895+
&::before {
6896+
border-radius: 8px 8px 0 0 !important;
6897+
}
68896898
}
68906899
}
6891-
}
6892-
6893-
&:not(:has(.tabbrowser-tab[pinned="true"])) {
6894-
&:has(.tabbrowser-tab:first-of-type:is([selected="true"][visuallyselected=""])) {
6895-
#nav-bar {
6896-
border-radius: 0 8px 0 0 !important;
6897-
&::before {
6900+
6901+
&:not(:has(.tabbrowser-tab[pinned="true"])) {
6902+
&:has(.tabbrowser-tab:first-of-type:is([selected="true"][visuallyselected=""])) {
6903+
#nav-bar {
68986904
border-radius: 0 8px 0 0 !important;
6905+
&::before {
6906+
border-radius: 0 8px 0 0 !important;
6907+
}
68996908
}
69006909
}
6901-
}
6902-
&:has(.tabbrowser-tab:first-of-type:not([selected="true"][visuallyselected=""])) {
6903-
#nav-bar {
6904-
border-radius: 8px 8px 0 0 !important;
6905-
&::before {
6910+
&:has(.tabbrowser-tab:first-of-type:not([selected="true"][visuallyselected=""])) {
6911+
#nav-bar {
69066912
border-radius: 8px 8px 0 0 !important;
6913+
&::before {
6914+
border-radius: 8px 8px 0 0 !important;
6915+
}
69076916
}
69086917
}
69096918
}
@@ -7103,19 +7112,21 @@ button
71037112
}
71047113

71057114
/* Left-most tab positioning */
7106-
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"], .tabbrowser-tab[pinned="true"]) {
7107-
& .tabbrowser-tab[pinned="true"]:first-of-type {
7108-
margin-right: 4px !important;
7115+
@media not -moz-pref("uc.winui.floating-tabs") {
7116+
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"], .tabbrowser-tab[pinned="true"]) {
7117+
& .tabbrowser-tab[pinned="true"]:first-of-type {
7118+
margin-right: 4px !important;
7119+
}
71097120
}
7110-
}
7111-
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"], .tabbrowser-tab[pinned="true"]):not(:has(.tabbrowser-tab:not([pinned="true"]))) {
7112-
& .tabbrowser-tab[pinned="true"]:last-of-type {
7113-
margin-right: 8px !important;
7121+
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"], .tabbrowser-tab[pinned="true"]):not(:has(.tabbrowser-tab:not([pinned="true"]))) {
7122+
& .tabbrowser-tab[pinned="true"]:last-of-type {
7123+
margin-right: 8px !important;
7124+
}
71147125
}
7115-
}
7116-
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"], .tabbrowser-tab:not([pinned="true"])) {
7117-
& .tabbrowser-tab:first-of-type {
7118-
margin-left: 4px !important;
7126+
:root:has(#tabbrowser-arrowscrollbox[orient="horizontal"], .tabbrowser-tab:not([pinned="true"])) {
7127+
& .tabbrowser-tab:first-of-type {
7128+
margin-left: 4px !important;
7129+
}
71197130
}
71207131
}
71217132

@@ -7156,7 +7167,7 @@ button
71567167
z-index: -1;
71577168
}
71587169

7159-
/* Rounded corners tweak toggle */
7170+
/* Rounded corners tweak */
71607171
@media -moz-pref("uc.winui.rounded-corners") {
71617172
:root:not([inDOMFullscreen="true"],
71627173
[sizemode="fullscreen"],
@@ -7189,7 +7200,7 @@ button
71897200
}
71907201

71917202
/* === Tabbox container === */
7192-
:root {
7203+
:root:has(#sidebar-main[hidden=""]) {
71937204
tabbox#tabbrowser-tabbox {
71947205
margin: 0 5px 5px 5px !important;
71957206
border-radius: 0 0 5px 5px !important;
@@ -7211,6 +7222,40 @@ button
72117222
}
72127223
}
72137224
}
7225+
:root:has(#sidebar-main:not([hidden=""])) {
7226+
#sidebar-main {
7227+
margin: 0 0 5px 5px !important;
7228+
box-shadow:
7229+
1px 0 0 0 light-dark(rgba(0,0,0,.0605), rgba(0,0,0,.135)),
7230+
-1px 0 0 0 light-dark(rgba(0,0,0,.0605), rgba(0,0,0,.135)),
7231+
0 1px 0 0 light-dark(rgba(0,0,0,.0605), rgba(0,0,0,.135)) !important;
7232+
border-radius: 0 0 0 5px !important;
7233+
}
7234+
&[sizemode="maximized"] {
7235+
#sidebar-main {border-radius: 0 0 0 8px !important;}
7236+
}
7237+
7238+
tabbox#tabbrowser-tabbox {
7239+
margin: 0 5px 5px 0 !important;
7240+
border-radius: 0 0 5px 0 !important;
7241+
clip-path: inset(-1px -1px -1px -1px round 0 0 7px 0) !important;
7242+
box-shadow:
7243+
1px 0 0 0 light-dark(rgba(0,0,0,.175), rgba(0,0,0,.135)),
7244+
0 1px 0 0 light-dark(rgba(0,0,0,.175), rgba(0,0,0,.135)) !important;
7245+
7246+
/* Maximized state */
7247+
&[sizemode="maximized"] & {
7248+
border-radius: 8px 0 8px 0 !important;
7249+
}
7250+
7251+
/* Inner browser rounding when UI is visible */
7252+
:root:not([inDOMFullscreen="true"]):not([sizemode="fullscreen"]):not([chromehidden*="toolbar"]):not([chromehidden*="menubar"]) & browser {
7253+
border-radius: 8px 0 5px 0 !important;
7254+
clip-path: circle(100%) !important;
7255+
}
7256+
}
7257+
7258+
}
72147259
}
72157260

72167261
@media -moz-pref("uc.winui.navbar-highlights") {
@@ -8500,6 +8545,31 @@ button
85008545
--button-outer-padding-block-end: unset !important;
85018546
}
85028547
}
8548+
8549+
/* Tab groups */
8550+
.tab-group-line {
8551+
border-radius: 99px !important;
8552+
height: 3px;
8553+
width: 16px;
8554+
margin: 35px 0 0 0 !important;
8555+
}
8556+
.tab-group-overflow-count-container {
8557+
#tabbrowser-tabs[orient="vertical"] tab-group[hasactivetab][hasmultipletabs] > &::after {
8558+
width: 3px !important;
8559+
margin-block: auto;
8560+
margin-left: 8px !important;
8561+
border-radius: 99px !important;
8562+
height: 16px !important;
8563+
}
8564+
}
8565+
#tabbrowser-tabs[orient="vertical"][expanded] {
8566+
& tab-group > :is(.tab-group-label-container, .tabbrowser-tab), &[movingtab][movingtab-addToGroup]:not([movingtab-group], [movingtab-ungroup]) .tabbrowser-tab:is(:active, [multiselected]) {
8567+
margin-inline-start: 0 !important;
8568+
}
8569+
}
8570+
.tab-group-label-container:has(.tab-group-label[aria-expanded="false"]) {
8571+
margin-bottom: 8px !important;
8572+
}
85038573

85048574
/* --- Animations --- */
85058575
@keyframes fastInvoke {

chrome/userContent.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@
6767
height: 32px !important;
6868
}
6969
}
70-
71-
.shortcuts-refresh .top-site-outer .tile .top-site-icon {
70+
.top-site-outer .tile .top-site-icon {
7271
border-radius: 4px !important;
7372
}
7473

0 commit comments

Comments
 (0)