You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The below SCSS code should compile, verbatim, to CSS, but fails to compile with "auto is not a number".
div {
width: min(200px, auto);
}
Expected: no change to file, because it is already valid and correct CSS.
Minimal example:
fnmain(){let scss = r#" div { width: min(100px, auto); } "#;let css = grass::from_string(scss,&grass::Options::default());println!("{:#?}", css);assert!(css.is_ok(),"Failed to compile");}
Same result is found using 100% or 100vw instead of 100px, or switching argument order.
I would assume that min is a SCSS function (as well as CSS), expecting literal or variable arguments, not auto keyword. The error can be bypassed by not including brackets in the function call, eg. width: min 100px, auto;.
I assume this is unintended behaviour, as I could not find an explaination online or in the documentation.
The text was updated successfully, but these errors were encountered:
dxrcy
changed the title
Can't use auto keyword with min function fails to compile
Using auto keyword with min function fails to compile
Oct 30, 2023
The below SCSS code should compile, verbatim, to CSS, but fails to compile with
"auto is not a number"
.Expected: no change to file, because it is already valid and correct CSS.
Minimal example:
Same result is found using
100%
or100vw
instead of100px
, or switching argument order.I would assume that
min
is a SCSS function (as well as CSS), expecting literal or variable arguments, notauto
keyword. The error can be bypassed by not including brackets in the function call, eg.width: min 100px, auto;
.I assume this is unintended behaviour, as I could not find an explaination online or in the documentation.
The text was updated successfully, but these errors were encountered: