Learn AI, Data Science & Business — Earn Certificates That Get You Hired
Free courses from frontend to fullstack and AI
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This course introduces native CSS nesting, showing how to build nested and compound selectors with the ampersand. It also covers nested media queries, specificity, declaration order, readability, browser support, and differences from Sass nesting.
Syllabus
- Introduction
- What is Nesting?
- Descendant selectors and nesting multiple levels deep
- The ampersand / nesting selector
- When do we need to use &?
- What we can’t use & for
- Creating compound selectors
- using & for hover and focus
- using & with not
- Using the & after another selector
- Nested media queries
- Nesting can change the order of your declarations
- Specificity with nesting
- Readability and searchability of your code base
- Browser support
Taught by
Kevin Powell