mirror of
https://github.com/google/blockly.git
synced 2026-01-10 02:17:09 +01:00
Move flyout label css into the renderer (#3780)
* Move flyout label css into the renderer and add theme options
This commit is contained in:
@@ -294,9 +294,5 @@ Blockly.Css.register([
|
||||
'.blocklyFlyoutLabelBackground {',
|
||||
'opacity: 0;',
|
||||
'}',
|
||||
|
||||
'.blocklyFlyoutLabelText {',
|
||||
'fill: #000;',
|
||||
'}'
|
||||
/* eslint-enable indent */
|
||||
]);
|
||||
|
||||
@@ -1165,13 +1165,18 @@ Blockly.blockRendering.ConstantProvider.prototype.injectCSS_ = function(
|
||||
Blockly.blockRendering.ConstantProvider.prototype.getCSS_ = function(selector) {
|
||||
return [
|
||||
/* eslint-disable indent */
|
||||
// Fields.
|
||||
selector + ' .blocklyText {',
|
||||
'fill: #fff;',
|
||||
// Text.
|
||||
selector + ' .blocklyText, ',
|
||||
selector + ' .blocklyFlyoutLabelText {',
|
||||
'font-family: ' + this.FIELD_TEXT_FONTFAMILY + ';',
|
||||
'font-size: ' + this.FIELD_TEXT_FONTSIZE + 'pt;',
|
||||
'font-weight: ' + this.FIELD_TEXT_FONTWEIGHT + ';',
|
||||
'}',
|
||||
|
||||
// Fields.
|
||||
selector + ' .blocklyText {',
|
||||
'fill: #fff;',
|
||||
'}',
|
||||
selector + ' .blocklyNonEditableText>rect,',
|
||||
selector + ' .blocklyEditableText>rect {',
|
||||
'fill: ' + this.FIELD_BORDER_RECT_COLOUR + ';',
|
||||
@@ -1183,6 +1188,11 @@ Blockly.blockRendering.ConstantProvider.prototype.getCSS_ = function(selector) {
|
||||
'fill: #000;',
|
||||
'}',
|
||||
|
||||
// Flyout labels.
|
||||
selector + ' .blocklyFlyoutLabelText {',
|
||||
'fill: #000;',
|
||||
'}',
|
||||
|
||||
// Bubbles.
|
||||
selector + ' .blocklyText.blocklyBubbleText {',
|
||||
'fill: #000;',
|
||||
|
||||
@@ -904,13 +904,18 @@ Blockly.zelos.ConstantProvider.prototype.createDom = function(svg,
|
||||
Blockly.zelos.ConstantProvider.prototype.getCSS_ = function(selector) {
|
||||
return [
|
||||
/* eslint-disable indent */
|
||||
// Fields.
|
||||
selector + ' .blocklyText {',
|
||||
'fill: #fff;',
|
||||
// Text.
|
||||
selector + ' .blocklyText, ',
|
||||
selector + ' .blocklyFlyoutLabelText {',
|
||||
'font-family: ' + this.FIELD_TEXT_FONTFAMILY + ';',
|
||||
'font-size: ' + this.FIELD_TEXT_FONTSIZE + 'pt;',
|
||||
'font-weight: ' + this.FIELD_TEXT_FONTWEIGHT + ';',
|
||||
'}',
|
||||
|
||||
// Fields.
|
||||
selector + ' .blocklyText {',
|
||||
'fill: #fff;',
|
||||
'}',
|
||||
selector + ' .blocklyNonEditableText>rect:not(.blocklyDropdownRect),',
|
||||
selector + ' .blocklyEditableText>rect:not(.blocklyDropdownRect) {',
|
||||
'fill: ' + this.FIELD_BORDER_RECT_COLOUR + ';',
|
||||
@@ -921,6 +926,11 @@ Blockly.zelos.ConstantProvider.prototype.getCSS_ = function(selector) {
|
||||
selector + ' .blocklyEditableText>g>text {',
|
||||
'fill: #575E75;',
|
||||
'}',
|
||||
|
||||
// Flyout labels.
|
||||
selector + ' .blocklyFlyoutLabelText {',
|
||||
'fill: #575E75;',
|
||||
'}',
|
||||
|
||||
// Bubbles.
|
||||
selector + ' .blocklyText.blocklyBubbleText {',
|
||||
|
||||
Reference in New Issue
Block a user