Skip to content

fix bug when inlineCssVariables is disabled and computeCalcExpression is enabled #96

@tbela99

Description

@tbela99
const css = `
:root {
--color: green;
}
._19_u :focus {
    color:  hsl(from var(--color) calc(h * 2) s l);
}
`;

const result: TransformResult = await transform(css, {

    computeCalcExpression: true,
    beautify: true
});



console.debug(result.code);

Actual

:root {
 --color: green
}
._19_u :focus {
 color: #NaNNaNNaN
}

Expected

:root {
 --color: green
}
._19_u :focus {
 color: hsl(from var(--color) calc(h*2) s l)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions