Skip to content

Commit

Permalink
feat: block text color with stylesheet reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy O'Neill committed Feb 10, 2023
1 parent 02522ef commit 5258e78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions core/colours.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Blockly.Colours = {
"tertiary": "#FF3355"
},
"text": "#575E75",
"blockText": "#FFFFFF",
"workspace": "#F9F9F9",
"toolboxHover": "#4C97FF",
"toolboxSelected": "#e9eef2",
Expand Down
6 changes: 3 additions & 3 deletions core/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ Blockly.Css.mediaPath_ = '';
* @param {string} pathToMedia Path from page to the Blockly media directory.
*/
Blockly.Css.inject = function(hasCss, pathToMedia) {
// Only inject the CSS once.
// Clear the CSS if it has already been injected.
if (Blockly.Css.styleSheet_) {
return;
document.head.removeChild(Blockly.Css.styleSheet_.ownerNode);
}
// Placeholder for cursor rule. Must be first rule (index 0).
var text = '.blocklyDraggable {}\n';
Expand Down Expand Up @@ -459,7 +459,7 @@ Blockly.Css.CONTENT = [
'}',

'.blocklyText {',
'fill: #fff;',
'fill: $colour_blockText;',
'font-family: "Helvetica Neue", Helvetica, sans-serif;',
'font-size: 12pt;',
'font-weight: 500;',
Expand Down

0 comments on commit 5258e78

Please # to comment.