Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
GordonS
on Feb 18, 2019
|
parent
|
context
|
favorite
| on:
Why I Write CSS in JavaScript
Does it use (shared) variables, like with SASS?
With SASS, I find it really convenient to define variables for common/brand colours, for example.
bastawhiz
on Feb 18, 2019
[–]
You can define a "theme" object, which you can inject into your styles (with an expression inside the template literal). Other libraries support variables more directly.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
With SASS, I find it really convenient to define variables for common/brand colours, for example.