Changes Css.register API to accept string param (#5472)

* Chnages Css.register API to accept string param

* Address self review comments and nits

* Fix code-comment

* Address minor review comments and nits

* Allow passing an array of strings when registering CSS

* Fix lint errors

Co-authored-by: Aaron Dodson <adodson@google.com>
This commit is contained in:
Sandeep Dubey
2021-10-15 04:17:10 +05:30
committed by GitHub
parent abee92c7c9
commit ec9092fd67
14 changed files with 668 additions and 646 deletions

View File

@@ -402,12 +402,17 @@ Comment.prototype.dispose = function() {
/**
* CSS for block comment. See css.js for use.
*/
Css.register([
/* eslint-disable indent */
'.blocklyCommentTextarea {', 'background-color: #fef49c;', 'border: 0;',
'outline: 0;', 'margin: 0;', 'padding: 3px;', 'resize: none;',
'display: block;', 'text-overflow: hidden;', '}'
/* eslint-enable indent */
]);
Css.register(`
.blocklyCommentTextarea {
background-color: #fef49c;
border: 0;
display: block;
margin: 0;
outline: 0;
padding: 3px;
resize: none;
text-overflow: hidden;
}
`);
exports = Comment;