Lightningcss is ordering CSS custom variables inconsistently.
Even if I don't make changes in the source file I might get a different output. This is a problem since I'm using contenthash in filenames in order to let users keep using cached version of the file when there are no changes in the content. So, change in order effectivelly invalidates cache for users.
Lightningcss is ordering CSS custom variables inconsistently.
Even if I don't make changes in the source file I might get a different output. This is a problem since I'm using
contenthash
in filenames in order to let users keep using cached version of the file when there are no changes in the content. So, change in order effectivelly invalidates cache for users.How to reproduce:
minify
to easily see the difference in the outputSet the following as input:
--foo
and--bar
variables are getting ordered differentlyhttps://github.com/user-attachments/assets/878a2f90-0e82-4c9c-8b11-15fc31ce435e
If you remove
all: unset
or move it above variable declarations then the issue with the order can't be reproduced anymore.