
Sign up to save your podcasts
Or


In this Hasty Treat, Scott and Wes talk about CSS variables, a.k.a CSS Custom Properties - why you might want to use them, why they’re better than various preprocessor’s variables, and pitfalls to watch out for and avoid.
Kyle Prinsloo’s Freelancing & Beyond — SponsorKyle Prinsloo teaches you everything you need to know about freelancing, including how to quit your job, earn a side-income and start taking control of your life. Check it out at https://studywebdevelopment.com/freelancing and use the coupon code “syntax” at checkout to get 25% off.
Show Notes3:25 - What
--example-name, represent custom properties
called using var()
Overwrite with a more specific style
Use JavaScript to append .style.setPropert(
How are they scoped?
9:10 - Why
Uses:
Independent values for things that can’t be broken up:
Inline properties can be picked up by regular CSS (color, size, etc.)
hey
Themes that can easily be changed at runtime for entire app
19:15 - Calculations
20:10 - Bummers
By Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers4.9
977977 ratings
In this Hasty Treat, Scott and Wes talk about CSS variables, a.k.a CSS Custom Properties - why you might want to use them, why they’re better than various preprocessor’s variables, and pitfalls to watch out for and avoid.
Kyle Prinsloo’s Freelancing & Beyond — SponsorKyle Prinsloo teaches you everything you need to know about freelancing, including how to quit your job, earn a side-income and start taking control of your life. Check it out at https://studywebdevelopment.com/freelancing and use the coupon code “syntax” at checkout to get 25% off.
Show Notes3:25 - What
--example-name, represent custom properties
called using var()
Overwrite with a more specific style
Use JavaScript to append .style.setPropert(
How are they scoped?
9:10 - Why
Uses:
Independent values for things that can’t be broken up:
Inline properties can be picked up by regular CSS (color, size, etc.)
hey
Themes that can easily be changed at runtime for entire app
19:15 - Calculations
20:10 - Bummers

273 Listeners

382 Listeners

288 Listeners

626 Listeners

583 Listeners

287 Listeners

44 Listeners

214 Listeners

485 Listeners

189 Listeners

212 Listeners

63 Listeners

140 Listeners

61 Listeners

67 Listeners