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 — Sponsor Kyle 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 Notes 3:25 - What
--example-name, represent custom propertiesvar()How are they scoped?
9:10 - Why
Uses:
Independent values for things that can’t be broken up:
box-shadow: 2px 2px 2px 2px red
Inline properties can be picked up by regular CSS (color, size, etc.)
hey
19:15 - Calculations
20:10 - Bummers
Tweet us your tasty treats! * Scott’s Instagram * LevelUpTutorials Instagram * Wes’ Instagram * Wes’ Twitter * Wes’ Facebook * Scott’s Twitter * Make sure to include @SyntaxFM in your tweets