Skip to content

Fixed handling of calc() function in CSS minifier#35

Merged
jleeson merged 1 commit intojleeson:masterfrom
felixfon:fix-calc
May 27, 2025
Merged

Fixed handling of calc() function in CSS minifier#35
jleeson merged 1 commit intojleeson:masterfrom
felixfon:fix-calc

Conversation

@felixfon
Copy link
Copy Markdown
Contributor

Improved parsing of calc() functions to correctly handle nested parentheses.

Examples:

.class {
  top: calc(var(--variable-name));
  top: calc(var(--variable-name) + 10px);
  top: calc((10px + var(--variable-name)) * 2);
}

@jleeson jleeson merged commit 18cae14 into jleeson:master May 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants