mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
feat: block text color with stylesheet reloading
This commit is contained in:
parent
02522ef252
commit
5258e785c1
2 changed files with 4 additions and 3 deletions
|
@ -83,6 +83,7 @@ Blockly.Colours = {
|
|||
"tertiary": "#FF3355"
|
||||
},
|
||||
"text": "#575E75",
|
||||
"blockText": "#FFFFFF",
|
||||
"workspace": "#F9F9F9",
|
||||
"toolboxHover": "#4C97FF",
|
||||
"toolboxSelected": "#e9eef2",
|
||||
|
|
|
@ -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';
|
||||
|
@ -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;',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue