MCPcopy Create free account
hub / github.com/cssinjs/jss / toString

Method toString

packages/jss/src/plugins/keyframesRule.js:50–60  ·  view source on GitHub ↗

* Generates a CSS string.

(options = defaultToStringOptions)

Source from the content-addressed store, hash-verified

48 * Generates a CSS string.
49 */
50 toString(options = defaultToStringOptions) {
51 const {linebreak} = getWhitespaceSymbols(options)
52 if (options.indent == null) options.indent = defaultToStringOptions.indent
53 if (options.children == null) options.children = defaultToStringOptions.children
54 if (options.children === false) {
55 return `${this.at} ${this.id} {}`
56 }
57 let children = this.rules.toString(options)
58 if (children) children = `${linebreak}${children}${linebreak}`
59 return `${this.at} ${this.id} {${children}}`
60 }
61}
62
63const keyRegExp = /@keyframes\s+/

Callers

nothing calls this directly

Calls 2

getWhitespaceSymbolsFunction · 0.85
toStringMethod · 0.65

Tested by

no test coverage detected