CSS in renderers (#3446)

* Have each renderer declare some CSS that is specific to the renderer.
This commit is contained in:
Sam El-Husseini
2019-11-18 16:14:19 -08:00
committed by GitHub
parent 32e2f9ccdf
commit 70c24cf94e
9 changed files with 124 additions and 44 deletions

View File

@@ -77,6 +77,7 @@ Blockly.Css.inject = function(hasCss, pathToMedia) {
// Inject CSS tag at start of head.
var cssNode = document.createElement('style');
cssNode.id = 'blockly-common-style';
var cssTextNode = document.createTextNode(text);
cssNode.appendChild(cssTextNode);
document.head.insertBefore(cssNode, document.head.firstChild);
@@ -254,11 +255,6 @@ Blockly.Css.CONTENT = [
'stroke-width: 1;',
'}',
'.injectionDiv:not(.zelos-renderer) .blocklySelected>.blocklyPath {',
'stroke: #fc3;',
'stroke-width: 3px;',
'}',
'.blocklySelected>.blocklyPathLight {',
'display: none;',
'}',
@@ -334,13 +330,6 @@ Blockly.Css.CONTENT = [
'display: none;',
'}',
'.blocklyText {',
'cursor: default;',
'fill: #fff;',
'font-family: sans-serif;',
'font-size: 11pt;',
'}',
'.blocklyMultilineText {',
'font-family: monospace;',
'}',
@@ -349,22 +338,6 @@ Blockly.Css.CONTENT = [
'pointer-events: none;',
'}',
'.blocklyNonEditableText>rect,',
'.blocklyEditableText>rect {',
'fill: #fff;',
'fill-opacity: .6;',
'}',
'.blocklyNonEditableText>text,',
'.blocklyEditableText>text {',
'fill: #000;',
'}',
'.blocklyEditableText:not(.editing):hover>rect {',
'stroke: #fff;',
'stroke-width: 2;',
'}',
'.blocklyBubbleText {',
'fill: #000;',
'}',