Overview
You may have heard about CSS variables (aka CSS custom properties), but think it’s not something you can use yet. Plus, you already have your preprocessor pipeline in place, why should you care? This talk will show how CSS variables are much more powerful than static preprocessor variables and can be used today without compromising progressive enhancement. You will also learn several creative tips and tricks to take full advantage of them. As is customary with Lea’s CSS talks, expect a swath of live demos to demonstrate the material.
Target Audience
Advanced CSS developers with some vanilla JS knowledge
Assumed Audience Knowledge
Advanced HTML & CSS, some vanilla JS.
Audience Members Will Learn
- How to take advantage of CSS variables without hurting older browsers
- How to use CSS variables to create flexible, responsive components
- How to use CSS variables in JS for simplifying many common tasks and better decoupling behavior and presentation
- How to emulate custom longhands and custom properties with CSS variables
- CSS variables + animation, CSS variables + SVG