Thanks for the reply! I am storing the values in a JSON format, so I cant just dump the raw data into css. It also need it to be global css, not for just one component, hence the :root selector. Lastly, doing it this way everything stays server side and avoids any flickering of default styles.
Like many things, there is no right or wrong. Just whatever works best for your use case.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the reply! I am storing the values in a JSON format, so I cant just dump the raw data into css. It also need it to be global css, not for just one component, hence the
:root
selector. Lastly, doing it this way everything stays server side and avoids any flickering of default styles.Like many things, there is no right or wrong. Just whatever works best for your use case.