Skip to content
Astera Technology

CSS selector scope and cascade

Layer priority, low-specificity defaults and direct-child rules.

Astera Technology

Let a later layer win without escalating specificity

Trace a normal declaration across base and component cascade layers.

Practical lesson
Astera Technology

Scope a default with a zero-specificity context

Compare :where(.lesson) p with a plain .lesson p selector.

Practical lesson
Astera Technology

Limit a style to direct children

Compare the child combinator with a descendant selector on an original two-level tree.

Practical lesson