Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good use case for @container, @scope and :has(), where you forgo class definitions and use --custom-properties on the parent scope/container which are inherited downwards based on the existence of a scoped DOM pattern/container query, or 'upwards' by using a :has(child-selector) on the parent.

Although be sure to avoid too many :has(:nth-child(n of complex selector)) in case of frequent DOM updates.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: