* Generates a CSS string.
(options = defaultToStringOptions)
| 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 | |
| 63 | const keyRegExp = /@keyframes\s+/ |
nothing calls this directly
no test coverage detected