Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

Commit 6a105c0

Browse files
committed
refactor(CSS): move variables to src/index.ts
Also move them from html to .injectionDiv.
1 parent df575f0 commit 6a105c0

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

src/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,17 @@ Blockly.Css.register(`
142142
}
143143
`);
144144

145+
// Set variables that will be used to control the appearance of the
146+
// focus indicators. Attach them to the injectionDiv since they will
147+
// apply to things contained therein.
148+
//
149+
// This should be moved to core, either to core/css.ts
150+
// or to core/renderers/.
151+
Blockly.Css.register(`
152+
.injectionDiv {
153+
--blockly-active-node-color: #fff200;
154+
--blockly-active-tree-color: #60a5fa;
155+
--blockly-selection-width: 3px;
156+
}
157+
`);
158+

test/index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,6 @@
8686
font-weight: bold;
8787
}
8888

89-
html {
90-
--blockly-active-node-color: #fff200;
91-
--blockly-active-tree-color: #60a5fa;
92-
--blockly-selection-width: 3px;
93-
}
94-
9589
/* Blocks, connections and fields. */
9690
.blocklyKeyboardNavigation
9791
.blocklyActiveFocus:is(.blocklyPath, .blocklyHighlightedConnectionPath),

0 commit comments

Comments
 (0)