MCPcopy
hub / github.com/tailwindlabs/tailwindcss / applyImportant

Function applyImportant

packages/tailwindcss/src/compile.ts:333–347  ·  view source on GitHub ↗
(ast: AstNode[])

Source from the content-addressed store, hash-verified

331}
332
333function applyImportant(ast: AstNode[]): void {
334 for (let node of ast) {
335 // Skip any `AtRoot` nodes — we don't want to make the contents of things
336 // like `@keyframes` or `@property` important.
337 if (node.kind === 'at-root') {
338 continue
339 }
340
341 if (node.kind === 'declaration') {
342 node.important = true
343 } else if (node.kind === 'rule' || node.kind === 'at-rule') {
344 applyImportant(node.nodes)
345 }
346 }
347}
348
349function getPropertySort(nodes: AstNode[]) {
350 // Determine sort order based on properties used

Callers 1

compileAstNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected