MCPcopy Index your code
hub / github.com/callstack/linaria / decl

Method decl

packages/postcss-linaria/src/stringify.ts:120–141  ·  view source on GitHub ↗
(node: Declaration, semicolon: boolean)

Source from the content-addressed store, hash-verified

118 }
119
120 public override decl(node: Declaration, semicolon: boolean): void {
121 const between = this.raw(node, 'between', 'colon');
122 let { prop } = node;
123 const expressionStrings = node.root().raws.linariaTemplateExpressions;
124 if (prop.includes(placeholderText)) {
125 prop = substitutePlaceholders(prop, expressionStrings);
126 }
127
128 let value = this.rawValue(node, 'value');
129 if (value.includes(placeholderText)) {
130 value = substitutePlaceholders(value, expressionStrings);
131 }
132
133 let string = prop + between + value;
134
135 if (node.important) {
136 string += node.raws.important || ' !important';
137 }
138
139 if (semicolon) string += ';';
140 this.builder(string, node);
141 }
142
143 /** @inheritdoc */
144 public override document(node: Document): void {

Callers

nothing calls this directly

Calls 4

rawMethod · 0.95
rawValueMethod · 0.95
substitutePlaceholdersFunction · 0.85
rootMethod · 0.80

Tested by

no test coverage detected