SCSS compiler prevents compilation of valid CSS inside min()
and max()
functions
#2022
Labels
done in pr
Already done in a PR
min()
and max()
functions
#2022
Bug Report
Environment
Zola version: 0.16.1
Expected Behavior
SCSS should correctly compile expressions inside
min()
andmax()
. Specifically:min()
syntax (effectively replicated in the relatedmax()
andclamp()
) permits any number of expressions [MDN] (e.g.min(50% - 10px, 3em - 10px)
)calc()
is usable insidemin()
etc., probably because it supports the same syntax [MDN] but only for a single expression (e.g.min(calc(50% - 10px), calc(3em - 10px))
)Current Behavior
Zola produces errors when using either
serve
orbuild
commands.When trying case 1:
When trying case 2:
Note 1: both of these have been tested in Chromium and have produced the same valid outcome.
Note 2: this only applies to SCSS during compilation. Regular CSS, produced independently from the compiler (e.g.
/static/test.css
), results in no such issues during build.Note 3:
calc(min(50% - 10px, 3em - 10px))
does not produce an error.(As a sidenote: note the duplicate "Error:" in the second line of the error messages.)
Step to reproduce
Use the following declarations with any selector in SCSS, and have the stylesheet compile:
width: min(50% - 50vw, 2560px - 50vw)
width: min(calc(50% - 50vw), calc(2560px - 50vw))
The text was updated successfully, but these errors were encountered: