Using math.random()
in css module leads to a wrongly generated class names
#15391
Unanswered
orangecoloured
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I used
create-preact
to initialise my app.It uses
vite v4.3.2
andsass v1.69.5
.I have a scss module with a code that contains
math.random()
.And because of the
math.random()
as a result the names that are assigned to the html elements are not that are being generated and loaded in the stylesheet.With the
math.random()
Without the
math.random()
The css property name that is using
math.random()
does not matter. The behaviour is consistent per file which containsmath.random()
whilenpm run dev
.I tried reproducing it, but no success. The minimal version works correctly.
https://stackblitz.com/edit/vitejs-vite-dtieff?file=style.module.scss
Beta Was this translation helpful? Give feedback.
All reactions