twind icon indicating copy to clipboard operation
twind copied to clipboard

Spaces don't work in immediate `calc()` like `m-[calc(1px + 1%)]` correctly

Open alker0 opened this issue 3 years ago • 0 comments

m-[calc(1px + 1%)] doesn't escape white-space in generated selector like:

.m-\[calc\(1px \+ 1\%\)\]{margin:calc(1px + 1%)}

So this matches 1%)] in + in .m-[calc(1px but not m-[calc(1px + 1%)]. Removing spaces like m-[calc(1px+1%)] works. In real CSS, you must insert spaces around +/- while according to MDN so twind should allow users to follow that rule, or documents this behavior.

alker0 avatar Aug 23 '22 00:08 alker0