Skip to main content

Module utils

Module utils 

Source
Expand description

Port of src/ast/mixins/utils.ts: helpers shared by the minification features.

Functionsยง

is_in_template
true if the node is a @mixin or a @function rule, or is located inside one of them. the body of a mixin or a custom function is a template: it is evaluated when the mixin is applied or the function is called
move_result
move the last result descriptor of a custom function after its conditional rules: there is no early return. result: 16px; @media (...) { result: 20px } -> @media (...) { result: 20px } result: 16px