This API is provided by plugin.styles() and provides a way to apply dynamically created styles to elements in a document.
css
styles.css(rulesStr)
Params
-
string rulesStr
string with CSS styling declarations.
Example:
const styleObject = plugin.styles().css('background: black; color: white;'); ... const className = styleObject.getClassName(element) ... element.classList.add(className); ... styleObject.apply(someOtherElement);
Returns
-
Instance of GrStyleObject.