Note Modern CSS uses space-separated values with a slash for alpha: rgb(255 0 0 / 0.5). The older comma syntax still works but is being phased out. oklch provides perceptually uniform colors, so adjusting lightness produces visually consistent results across hues.
Note currentColor refers to the element's computed color value. It keeps borders, SVG fills, shadows, and other properties in sync with the text color. Change color once and everything follows.
Note Gradients are background-image values, not colors, so they cannot be used with the color property. You can layer multiple gradients separated by commas. Conic gradients are great for pie-chart-like visuals.
Note background-size: cover fills the entire container (may crop). contain fits the whole image (may leave empty space). When using the background shorthand, the size must follow position with a slash separator.
Note opacity affects the entire element and all its children. For transparent backgrounds only, use rgba or hsla with alpha instead. An element with opacity less than 1 creates a new stacking context.
Note Custom properties cascade and inherit like any CSS property. Define theme tokens on :root for global access. They can be changed per element, making component theming straightforward. The fallback value in var() is used only if the variable is not defined.
Note color-mix() blends two colors in the specified color space. Use oklch for perceptually even mixing. This replaces the need for pre-computed hover shades. Specify percentages to control the blend ratio.
color mixdarken colorlighten colorblend colorshover color
Note Layer multiple shadows for realistic depth (soft large shadow + tight small shadow). Use box-shadow: 0 0 0 Npx color as a pseudo-border that does not affect layout. The inset keyword creates inner shadows.
box shadowdrop shadowcard shadowelevationinner shadowfocus ring shadow