mirror of
https://github.com/google/blockly.git
synced 2026-01-29 11:40:14 +01:00
Pull comment CSS into comment modules.
This commit is contained in:
@@ -413,3 +413,21 @@ Blockly.Comment.prototype.dispose = function() {
|
||||
this.block_.comment = null;
|
||||
Blockly.Icon.prototype.dispose.call(this);
|
||||
};
|
||||
|
||||
/**
|
||||
* CSS for block comment. See css.js for use.
|
||||
*/
|
||||
Blockly.Css.register([
|
||||
/* eslint-disable indent */
|
||||
'.blocklyCommentTextarea {',
|
||||
'background-color: #fef49c;',
|
||||
'border: 0;',
|
||||
'outline: 0;',
|
||||
'margin: 0;',
|
||||
'padding: 3px;',
|
||||
'resize: none;',
|
||||
'display: block;',
|
||||
'overflow: hidden;',
|
||||
'}'
|
||||
/* eslint-enable indent */
|
||||
]);
|
||||
|
||||
70
core/css.js
70
core/css.js
@@ -412,76 +412,6 @@ Blockly.Css.CONTENT = [
|
||||
'padding: 0;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentForeignObject {',
|
||||
'position: relative;',
|
||||
'z-index: 0;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentRect {',
|
||||
'fill: #E7DE8E;',
|
||||
'stroke: #bcA903;',
|
||||
'stroke-width: 1px',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentTarget {',
|
||||
'fill: transparent;',
|
||||
'stroke: #bcA903;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentTargetFocused {',
|
||||
'fill: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentHandleTarget {',
|
||||
'fill: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentHandleTargetFocused {',
|
||||
'fill: transparent;',
|
||||
'}',
|
||||
|
||||
'.blocklyFocused>.blocklyCommentRect {',
|
||||
'fill: #B9B272;',
|
||||
'stroke: #B9B272;',
|
||||
'}',
|
||||
|
||||
'.blocklySelected>.blocklyCommentTarget {',
|
||||
'stroke: #fc3;',
|
||||
'stroke-width: 3px;',
|
||||
'}',
|
||||
|
||||
|
||||
'.blocklyCommentTextarea {',
|
||||
'background-color: #fef49c;',
|
||||
'border: 0;',
|
||||
'outline: 0;',
|
||||
'margin: 0;',
|
||||
'padding: 3px;',
|
||||
'resize: none;',
|
||||
'display: block;',
|
||||
'overflow: hidden;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentDeleteIcon {',
|
||||
'cursor: pointer;',
|
||||
'fill: #000;',
|
||||
'display: none',
|
||||
'}',
|
||||
|
||||
'.blocklySelected > .blocklyCommentDeleteIcon {',
|
||||
'display: block',
|
||||
'}',
|
||||
|
||||
'.blocklyDeleteIconShape {',
|
||||
'fill: #000;',
|
||||
'stroke: #000;',
|
||||
'stroke-width: 1px;',
|
||||
'}',
|
||||
|
||||
'.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {',
|
||||
'stroke: #fc3;',
|
||||
'}',
|
||||
|
||||
'.blocklyHtmlInput {',
|
||||
'border: none;',
|
||||
'border-radius: 4px;',
|
||||
|
||||
@@ -610,3 +610,68 @@ Blockly.WorkspaceCommentSvg.prototype.toXmlWithXY = function(opt_noId) {
|
||||
element.setAttribute('w', this.getWidth());
|
||||
return element;
|
||||
};
|
||||
|
||||
/**
|
||||
* CSS for workspace comment. See css.js for use.
|
||||
*/
|
||||
Blockly.Css.register([
|
||||
/* eslint-disable indent */
|
||||
'.blocklyCommentForeignObject {',
|
||||
'position: relative;',
|
||||
'z-index: 0;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentRect {',
|
||||
'fill: #E7DE8E;',
|
||||
'stroke: #bcA903;',
|
||||
'stroke-width: 1px',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentTarget {',
|
||||
'fill: transparent;',
|
||||
'stroke: #bcA903;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentTargetFocused {',
|
||||
'fill: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentHandleTarget {',
|
||||
'fill: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentHandleTargetFocused {',
|
||||
'fill: transparent;',
|
||||
'}',
|
||||
|
||||
'.blocklyFocused>.blocklyCommentRect {',
|
||||
'fill: #B9B272;',
|
||||
'stroke: #B9B272;',
|
||||
'}',
|
||||
|
||||
'.blocklySelected>.blocklyCommentTarget {',
|
||||
'stroke: #fc3;',
|
||||
'stroke-width: 3px;',
|
||||
'}',
|
||||
|
||||
'.blocklyCommentDeleteIcon {',
|
||||
'cursor: pointer;',
|
||||
'fill: #000;',
|
||||
'display: none',
|
||||
'}',
|
||||
|
||||
'.blocklySelected > .blocklyCommentDeleteIcon {',
|
||||
'display: block',
|
||||
'}',
|
||||
|
||||
'.blocklyDeleteIconShape {',
|
||||
'fill: #000;',
|
||||
'stroke: #000;',
|
||||
'stroke-width: 1px;',
|
||||
'}',
|
||||
|
||||
'.blocklyDeleteIconShape.blocklyDeleteIconHighlighted {',
|
||||
'stroke: #fc3;',
|
||||
'}'
|
||||
/* eslint-enable indent */
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user