blockly > Css

Css namespace

Functions

Function Description
inject(hasCss, pathToMedia) Inject the CSS into the DOM. This is preferable over using a regular CSS file since: a) It loads synchronously and doesn't force a redraw later. b) It speeds up loading by not blocking on a separate HTTP transfer. c) The CSS content may be made dynamic depending on init options.
register(cssContent) Add some CSS to the blob that will be injected later. Allows optional components such as fields and the toolbox to store separate CSS.