
CSS cascade layers let you plan precedence before specificity takes over
Use CSS cascade layers to give resets, components and utilities an explicit order, and understand why an unlayered rule can still win unexpectedly.

Use CSS cascade layers to give resets, components and utilities an explicit order, and understand why an unlayered rule can still win unexpectedly.

Use CSS subgrid when nested content needs to align with parent tracks, and distinguish that shared sizing from an independent nested grid.

Container queries let a component adapt to its available inline space. Use a small card example to see how they differ from viewport-based media queries.

CSP report-only mode reveals potential policy violations without blocking them. Use reports to test real workflows before enabling enforcement.

Use ResizeObserver when a component changes size without a window resize, and avoid callbacks that continually resize their own target.

An ETag lets a browser ask whether its cached representation is still current. Follow a simple conditional request without confusing validation with an error.

HTML inputmode helps browsers choose a keyboard, but it does not validate data. Design mobile fields with labels, suitable types and server-side checks.

A native HTML dialog can return a choice string without saving anything. Reset the value on opening and handle cancellation separately from persistence.

Reserve the right image proportions before loading finishes, and avoid a layout jump caused by a placeholder that changes shape.