Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
7/7
- :has() — style a parent based on its children, e.g. .card:has(img).
- Native nesting — write child rules inside their parent block.
- Container queries — @container respond to a component's own width.
- aspect-ratio — keep media at a fixed shape without padding hacks.
- clamp(min, ideal, max) — fluid sizing with guard rails.
Try it yourself
Knowledge check
0/1 answeredWhat does :has() enable?