Hacker News new | past | comments | ask | show | jobs | submit login

Css variables can be exported and modified in js through some libraries and without having the constraints of css in js.



You don’t even need a library. Modifying a CSS variable is as easy as:

    myElement.style.setProperty('--my-custom-property', 'some-value');




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: