Someone once told me that the CSS specifications are (no offense) a bit liberal arts. That’s a feature, not a bug. The humanities belong everywhere humans are involved.
An early proposal for creating declarative state controls in CSS, and styling elements based on the current state.
CSS Containment Level 3 defines Container Queries and container-relative units – allowing authors to build more intrinsic responsive components without knowledge of the overall layout.
Cascade & Inheritance Level 6 defines scoped styles – allowing authors to provide bounded ranges for selector-matching, and give priority to more ‘proximate’ scope origins.
Cascade & Inheritance Level 5 defines Cascade Layers – allowing authors to define explicit contained layers of specificity.