Skip to content

Commit a3a5927

Browse files
author
Drannex42
committed
v12022.11.21 :: Fixed sidebar flickering
1 parent 586c9ea commit a3a5927

5 files changed

Lines changed: 114 additions & 59 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
custom.css
1+
./custom.css
2+
./prefs.css

custom.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
11
/* Custom Styles */
2+
3+
#titlebar {
4+
appearance: none !important;
5+
}
6+
7+
#sidebar-header {
8+
padding: 5px 8px !important;
9+
padding-top: 11px !important;
10+
}
11+
12+
#nav-bar {
13+
padding-top: 2px !important;
14+
}
15+
16+
/* #main-window {
17+
background-color: rgba(0,0,0,0.45) !important;
18+
background: linear-gradient(8deg, rgba(0,0,0,0.4) 96%, #000) !important; /* gradient to hide the required windows control buttons in bg
19+
-moz-appearance: -moz-win-glass !important;
20+
} */
21+
/* #navigator-toolbox {
22+
background: transparent !important;
23+
}
24+
#TabsToolbar {
25+
background-image: none !important; /* Windows 7 */
26+
}
27+
/*
28+
/* referenced from what FF does when using some persona themes */
29+
/* :root {
30+
--toolbar-bgcolor: rgba(255,255,255,.4) !important;
31+
--toolbar-field-background-color: rgba(255,255,255,.8) !important;
32+
--urlbar-box-bgcolor: var(--button-bgcolor) !important;
33+
--button-hover-bgcolor: color-mix(in srgb, currentColor 17%, transparent) !important;
34+
--button-active-bgcolor: color-mix(in srgb, currentColor 30%, transparent) !important;
35+
}
36+
#urlbar-background, #searchbar {
37+
background-color: rgba(255,255,255,0.4) !important;
38+
}
39+
#urlbar[open="true"] > #urlbar-background {
40+
background-color: rgb(255,255,255) !important;
41+
}
42+
@media (prefers-color-scheme: dark) {
43+
:root {
44+
--toolbar-bgcolor: rgba(0,0,0,.2) !important;
45+
--toolbar-field-background-color: rgba(0,0,0,.8) !important;
46+
}
47+
#urlbar-background, #searchbar {
48+
background-color: rgba(0,0,0,0.2) !important;
49+
}
50+
#urlbar[open="true"] > #urlbar-background {
51+
background-color: rgb(0,0,0) !important;
52+
}
53+
}
54+
#nav-bar {
55+
box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--lwt-tabs-border-color, rgba(0,0,0,.3)) !important;
56+
color: var(--toolbar-color) !important;
57+
}
58+
.tab-background[selected="true"] {
59+
background-color: transparent !important;
60+
background-image: linear-gradient(transparent, transparent), linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none) !important;
61+
} */

extensions/sidebar.css

Lines changed: 43 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
Extension (Core): Sidebar
3-
Description: This is the core implenration of the sidebar, used in drannex42's FirefoxSidebar.
4-
Repository URL: https://github.com/drannex42/
5-
Version: v12022.04.17
3+
Description: This is the core implementation of the sidebar used in drannex42's FirefoxSidebar.
4+
Repository URL: https://github.com/drannex42/FirefoxSidebar
5+
Version: v12022.11.22 (YYYYY.MM.DD)
66
*/
77

88
#main-window #TabsToolbar {
@@ -23,29 +23,62 @@
2323
}
2424

2525
/*Collapse in default state and add transition*/
26-
#sidebar-box #sidebar:hover {
26+
#sidebar-box {
2727
/*! overflow: visible !important; */
28-
min-width: 40px;
29-
max-width: 40px;
3028
border-right: none !important; /* border-right: 1px solid var(--sidebar-border-color) !important; */
3129
z-index: 2;
30+
border-right: none !important;
31+
width: 100% !important;
32+
background: var(--custom-sidebar-bg, --sidebar-background);
33+
34+
/* lock sidebar to height by doing the inverse margin of the toolbar element */
35+
z-index: 1000 !important;
36+
position: relative !important;
37+
margin-top: var(--menubar-height) !important;
38+
border-right: none;
39+
transition: none !important;
40+
41+
/* lock sidebar to specified width */
42+
min-width: var(--sidebar-width) !important;
43+
max-width: var(--sidebar-width) !important;
44+
overflow: hidden !important;
45+
transition-property: width;
46+
transition-duration: 0.25s;
47+
transition-delay: 0.25s;
48+
transition-timing-function: ease-in;
49+
}
50+
51+
#sidebar-box::after {
52+
background: var(--sidebar-border-color) !important;
53+
margin-left: 207px;
54+
z-index: 9999999;
55+
position: absolute;
56+
content: " ";
57+
width: 1px;
58+
height: 100%;
59+
top: 0;
60+
right: 0px;
61+
}
62+
63+
#sidebar-box:hover:after {
64+
top: 42px;
3265
}
3366

3467
/*All other sidebar-boxes should be larger on hover*/
35-
#sidebar-box:hover {
68+
#sidebar-box:hover, #sidebar-box #sidebar:hover {
3669
min-width: 350px !important;
3770
max-width: 350px !important;
38-
z-index: 1;
71+
z-index: 999;
3972
margin-right: -300px !important;
4073
}
4174

4275
/*Tree Style Tabs && Sideberry specific sidebar width and size*/
4376

4477
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover,
45-
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover {
78+
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover,
79+
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] #sidebar:hover {
4680
min-width: 260px !important;
4781
max-width: 260px !important;
48-
z-index: 1;
4982
margin-right: -210px !important;
5083
}
5184

@@ -74,40 +107,7 @@
74107
outline: none !important;
75108
}
76109

77-
#sidebar-box {
78-
/* lock sidebar to height by doing the inverse margin of the toolbar element */
79-
z-index: 1000 !important;
80-
position: relative !important;
81-
margin-top: var(--menubar-height) !important;
82-
border-right: none;
83-
transition: none !important;
84-
background: transparent !important;
85-
86-
/* lock sidebar to specified width */
87-
min-width: var(--sidebar-width) !important;
88-
max-width: var(--sidebar-width) !important;
89-
overflow: hidden !important;
90-
transition-property: width;
91-
transition-duration: 0.25s;
92-
transition-delay: 0.25s;
93-
transition-timing-function: ease-in;
94-
}
95-
96-
#sidebar-box::after {
97-
background: var(--sidebar-border-color) !important;
98-
margin-left: 207px;
99-
z-index: 9999999;
100-
position: absolute;
101-
content: " ";
102-
width: 1px;
103-
height: 100%;
104-
top: 0;
105-
right: 0px;
106-
}
107110

108-
#sidebar-box:hover:after {
109-
top: 42px;
110-
}
111111

112112
.sidebar-splitter {
113113
opacity: 0 !important;
@@ -126,15 +126,6 @@ toolbarseparator {
126126
display: none;
127127
}
128128

129-
#sidebar {
130-
border-right: none !important;
131-
overflow: hidden;
132-
width: 50px !important;
133-
min-width: 50px !important;
134-
width: 100% !important;
135-
background: var(--custom-sidebar-bg, --sidebar-background);
136-
}
137-
138129
#nav-bar-customization-target {
139130
z-index: 99999;
140131
position: relative;

prefs.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
This sets the background for the other sidebar options (bookmarks, history, in case it is transparent from a theme that is not set up properly
1616
*/
1717
/* --custom-sidebar-bg: Field; /* Default: Field (Disabled) */
18-
/* --custom-sidebar-header-bg: Field; /* Default: Field (Disabled) */
18+
--custom-sidebar-header-bg: #000; /* Default: Field (Disabled) */
1919

2020
/* ====== Extension Settings ====== */
2121

@@ -25,7 +25,7 @@
2525
=========================================================================
2626
*/
2727
--csd-width: 100px;
28-
--csd-top: 6px;
28+
--csd-top: 8px;
2929

3030
/*
3131
CSD - Left Side ===
@@ -42,8 +42,8 @@
4242
Defaults: --csd-right: 0px; --csd-margin-right: 95px;
4343
*/
4444

45-
--csd-right: 0px;
46-
--csd-margin-right: 95px;
45+
--csd-right: 36px;
46+
--csd-margin-right: 130px;
4747

4848
/* === END: Window Control / Client Side Display Settings === */
4949

userChrome.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
@import url("./extensions/window_controls.css");
3030

3131
/* Bookmark Arrows :: add a little arrow next to folders in bookmarks toolbar */
32-
@import url("./extensions/bookmark_arrow.css");
32+
/* @import url("./extensions/bookmark_arrow.css"); */
3333

3434
/* Superbox Removal :: heavily customize superbox (flat look, colors, smaller entries,...) */
3535
@import url("./extensions/superbox_removal.css");
3636

3737
/* Avatar Size :: change the avatar size for the Firefox Account to what makes sense */
38-
@import url("./extensions/avatar_size.css");
38+
/* @import url("./extensions/avatar_size.css"); */
3939

4040
/* fix sidebar switcher if bookmarks toolbar is hidden */
4141
/* @import url("./extensions/fix_hidden_bookmarks.css"); */
@@ -69,3 +69,6 @@
6969
@import url("./custom.css");
7070

7171
/* ========================================================================= */
72+
73+
74+

0 commit comments

Comments
 (0)