Loading tutorials
var(). Here you will learn how the second argument of var() works, how to nest fallbacks, and which mistakes cause surprises.3 min readvar(). The chapter covers where a custom property is visible, how children get its value, and one inheritance mistake that catches many people.3 min readvar(), and write a fallback. It also assumes you know how the cascade picks a winning declaration. Here you will learn when var() is replaced, and what the browser does when the result is not a valid value.3 min readvar(), and that you know how inheritance and the cascade work. Here you use custom properties as the inputs to math, so that one base value produces a whole set of consistent sizes and colors.3 min readvar(), and that you know how they inherit down the DOM tree. It also assumes you know basic specificity and source-order rules. Here you will use those pieces to switch a whole page between a light and a dark theme.3 min readvar() reads them, how fallbacks work, and how inheritance scopes a value to an element and its descendants. Here you use those pieces to give a component a small, deliberate styling API.3 min readvar(). It also assumes you understand scope and inheritance, and that you can select elements with document.querySelector. Here you will read and write custom properties from scripts, and see where the common mista3 min readvar(). It also assumes you know how inheritance and the cascade work, and that you understand how var() substitution behaves. Those topics are covered in earlier chapters.3 min readvar(). It also assumes you know how transition and @keyframes work, and that you have seen @property registration. It covers why registration makes animation possible and how to use it.3 min readvar(), and explain how they inherit. It covers the places where custom properties behave in surprising ways, and how to avoid each one.3 min read