MCPcopy Index your code
hub / github.com/darkreader/darkreader / formatRule

Function formatRule

src/utils/css-text/format-css.ts:13–19  ·  view source on GitHub ↗
(rule: ParsedAtRule | ParsedStyleRule, indent: string)

Source from the content-addressed store, hash-verified

11 const tab = ' ';
12
13 function formatRule(rule: ParsedAtRule | ParsedStyleRule, indent: string) {
14 if (isParsedStyleRule(rule)) {
15 formatStyleRule(rule as ParsedStyleRule, indent);
16 } else {
17 formatAtRule(rule, indent);
18 }
19 }
20
21 function formatAtRule({type, query, rules}: ParsedAtRule, indent: string) {
22 lines.push(`${indent}${type} ${query} {`);

Callers 2

formatAtRuleFunction · 0.85
formatParsedCSSFunction · 0.85

Calls 3

isParsedStyleRuleFunction · 0.90
formatStyleRuleFunction · 0.85
formatAtRuleFunction · 0.85

Tested by

no test coverage detected