Variables & Conditionals
summary
CSS gains real custom properties that inherit and are scoped via var() so colors, calculated column fractions and boxed‑shadow components become live, cascadeable values; browsers already implement it in Chrome and newer Safari with Firefox regressions reported. Conditional rules appear as @supports and expose a CSS.supports() API that ties truth to parseability so feature detection needs no Modernizr. Examples include theming, a box‑shadow blur variable hack, JS polyfills using author-prefixed custom props, and planned features like parent‑var, default values and type annotations.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:00History
- 2:13Modern Variables
- 5:06Use Cases for Variables
- 13:00Conditional Rules
- 21:18Variables
- 23:12Variable Hacks
- 29:51Questions
- 30:47Hierarchy
- 33:02Sprites
- 35:56Functions
- 37:07Nondeterministic values
- 37:52Subject Selector
- 41:12The Secret
- 42:19Accessing Style Sheets
- 44:21CSS Dash Values
- 46:39Shadow DOM Web Components
- 49:38Scoped Style Sheets








