Skip to content

Commit 7858afd

Browse files
Improve readability of Set Pitch Preview text in light mode (#5165)
* Fixed text color in light mode * fix: help widget in dark mode and overall text coloring * fix prettier formatting
1 parent 1dfee78 commit 7858afd

File tree

6 files changed

+63
-23
lines changed

6 files changed

+63
-23
lines changed

css/activities.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,6 @@ table {
11821182
overflow-x: hidden;
11831183
overflow-y: auto;
11841184
width: 350px;
1185-
background: #e8e8e8 !important;
11861185
padding: 1rem 1rem 0 0;
11871186
display: flex;
11881187
flex-direction: column;

css/darkmode.css

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
1-
/* css/darkmode.css - placeholder dark mode styles */
2-
:root{
3-
--bg: #0f0f10;
4-
--fg: #e8e8e8;
5-
}
1+
/* Light Mode Defaults */
62
body {
3+
--bg: #e8e8e8;
4+
--fg: #666666;
5+
--overlay-bg: rgba(255, 255, 255, 0.75);
6+
}
7+
8+
/* Dark Mode Overrides */
9+
body.dark {
10+
--bg: #1d1d20;
11+
--fg: #e8e8e8;
12+
--overlay-bg: rgba(15, 15, 16, 0.75);
13+
714
background: var(--bg);
815
color: var(--fg);
916
}
1017

18+
/* Help widget colors */
19+
.dark #helpBodyDiv {
20+
background: #1d1d20;
21+
color: var(--fg);
22+
}
23+
24+
.dark #helpBodyDiv > .heading,
25+
.dark #helpBodyDiv p {
26+
color: var(--fg);
27+
}
28+
/* Fix white side bars in Help / Tour widget */
29+
.dark #floatingWindows .wfWinBody {
30+
background-color: var(--bg) !important;
31+
}
32+
33+
.dark #floatingWindows .windowFrame {
34+
background-color: var(--bg) !important;
35+
}

css/themes.css

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
}
3535

3636
.dark #floatingWindows>.windowFrame {
37-
border: 2px solid #000000;
38-
background-color: #454545;
37+
border: 2px solid var(--border);
38+
background-color: var(--bg);
3939
}
4040

4141
.dark .wfbtItem {
@@ -46,6 +46,11 @@
4646
color: #e8e8e8;
4747
}
4848

49+
.dark #floatingWindows>.windowFrame>.wfWinBody .wfbWidget {
50+
color: #ccc !important;
51+
background-color: #3f3f44 !important;
52+
}
53+
4954
.dark .popupMsg {
5055
background-color: #084e86;
5156
color: #e8e8e8;
@@ -56,8 +61,7 @@
5661
}
5762

5863
.dark #loading-image-container {
59-
background: #1a1a1a !important;
60-
background-color: #1a1a1a !important;
64+
background-color: var(--bg) !important;
6165
}
6266

6367
.dark #loadingText {
@@ -68,18 +72,18 @@
6872
color: #fff;
6973
}
7074

71-
.dark .modal-content {
72-
background-color: #1c1c1c;
73-
color: #fff;
75+
.modal-content {
76+
background-color: var(--panel-bg);
77+
color: var(--fg);
7478
}
7579

7680
.dark #submitLilypond {
7781
background-color: rgb(0, 102, 255);
7882
}
7983

8084
.dark #search,
81-
#helpfulSearch,
82-
.ui-autocomplete {
85+
.dark #helpfulSearch,
86+
.dark .ui-autocomplete {
8387
background-color: #1c1c1c !important;
8488
color: #fff !important;
8589
}
@@ -139,5 +143,20 @@
139143
.dark #confirmation-message {
140144
color: #e2e2e2;
141145
}
146+
body {
147+
--border: #cccccc;
148+
--bg: #ffffff;
149+
--fg: #666666;
150+
--panel-bg: #f5f5f5;
151+
--accent: #2196F3;
152+
}
153+
154+
body.dark {
155+
--border: #000000;
156+
--bg: #1d1d20;
157+
--fg: #e8e8e8;
158+
--panel-bg: #1c1c1c;
159+
--accent: #3fe0d1;
160+
}
142161

143162
/* Your Custom Theme can go here if you don't want to modify the existing dark mode */

dist/css/windows.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@
189189
height: 100vh;
190190
left: 0 !important;
191191
top: 0 !important;
192-
background-color: #e8e8e8;
193192
display: flex;
194193
flex-direction: column;
195194
}
@@ -292,7 +291,6 @@
292291
height: 100vh;
293292
left: 0 !important;
294293
top: 0 !important;
295-
background-color: #e8e8e8;
296294
display: flex;
297295
flex-direction: column;
298296
}
@@ -369,7 +367,6 @@
369367
height: 100vh;
370368
left: 0;
371369
top: 0;
372-
background-color: #e8e8e8;
373370
display: flex;
374371
flex-direction: column;
375372
}

js/widgets/help.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class HelpWidget {
7373
// Which help page are we on?
7474

7575
this._helpDiv.style.width = 100 + "%";
76-
this._helpDiv.style.backgroundColor = "#e8e8e8";
76+
// this._helpDiv.style.backgroundColor = "#e8e8e8";
7777

7878
// this._helpDiv.style.maxHeight = "100%";
7979
// this._helpDiv.style.overflowY = "auto";
@@ -453,7 +453,7 @@ class HelpWidget {
453453

454454
//this._helpDiv.style.width = "500px";
455455
this._helpDiv.style.height = "70vh";
456-
this._helpDiv.style.backgroundColor = "#e8e8e8";
456+
// this._helpDiv.style.backgroundColor = "#e8e8e8";
457457

458458
const helpDivHTML =
459459
'<div id="right-arrow" class="hover" tabindex="-1"></div><div id="left-arrow" class="hover" tabindex="-1"></div><div id="helpButtonsDiv" tabindex="-1"></div><div id="helpBodyDiv" tabindex="-1"></div>';
@@ -536,7 +536,7 @@ class HelpWidget {
536536

537537
const helpBody = docById("helpBodyDiv");
538538
helpBody.style.height = "70vh";
539-
helpBody.style.backgroundColor = "#e8e8e8";
539+
// helpBody.style.backgroundColor = "#e8e8e8";
540540
if (message) {
541541
let body = "";
542542
if (message.length > 1) {

js/widgets/widgetWindows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,12 @@ class WidgetWindow {
232232
this._overlayframe.style.width = "100vw";
233233
this._overlayframe.style.height = "calc(100vh - 64px)";
234234
this._overlayframe.style.border = "0.25vw solid black";
235-
this._overlayframe.style.backgroundColor = "rgba(255,255,255,0.75)";
235+
this._overlayframe.style.backgroundColor = "var(--overlay-bg)";
236236
} else {
237237
this._frame.style.zIndex = "10000";
238238
this._overlayframe.style.border = "0px";
239239
this._overlayframe.style.zIndex = "-1";
240-
this._overlayframe.style.backgroundColor = "rgba(255,255,255,0)";
240+
this._overlayframe.style.backgroundColor = "transparent";
241241
}
242242
}
243243

0 commit comments

Comments
 (0)