Skip to content

Commit b96f882

Browse files
committed
Make custom block colors compatible with dark modes
1 parent b1d90f6 commit b96f882

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

features/editor-dark-mode.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Version 1.8.
1818
--secondary-bg: #151515;
1919
--accent: #202020;
2020
--text: #bfbfbf;
21+
--editorDarkMode-primary-text: #ffffff;
2122
}
2223
2324
/*Main UI bar, similar bars, and dropdown menu*/

features/more-block-themes/script.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ export default async function ({ feature, console }) {
55
COLORS.rel = "stylesheet"
66
COLORS.href = feature.self.getResource("colors")
77
COLORS.disabled = true
8-
document.head.appendChild(COLORS)
8+
9+
ScratchTools.waitForElements("head", function() {
10+
document.head.appendChild(COLORS)
11+
})
912

1013
let THEMES = [
1114
{

features/more-block-themes/themes/transparent.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
--text-light: #000000;
3535
--text-normal: #000000;
36+
--text-light: var(--editorDarkMode-primary-text);
37+
--text-normal: var(--editorDarkMode-primary-text);
3638

3739
--arg-border: transparent;
3840
}

0 commit comments

Comments
 (0)