(cssProperty, indentationCount = 1)
| 576 | }; |
| 577 | |
| 578 | const stringifyCssProperty = (cssProperty, indentationCount = 1) => { |
| 579 | const property = `${indentation.repeat(indentationCount)}${cssProperty.property}: ${cssProperty.value};`; |
| 580 | const trailingComments = |
| 581 | cssProperty.trailingComments.length === 0 |
| 582 | ? "" |
| 583 | : ` /* ${cssProperty.trailingComments.map((comment) => comment.value.trim()).join(" ")} */`; |
| 584 | const leadingComments = stringifyComments( |
| 585 | cssProperty.leadingComments, |
| 586 | indentationCount + 1, |
| 587 | ); |
| 588 | return `${leadingComments}${property}${trailingComments}${"\n"}`; |
| 589 | }; |
| 590 | |
| 591 | const stringifyCssRuleset = (selector, ruleset, indentationCount = 0) => { |
| 592 | // Conditional rulesets contain a class name in the nested ruleset. |
no test coverage detected