Coding task · HTML and CSS course · Module 7: SASS

SASS Selector Nesting

SASS nesting mirrors the HTML structure - like chambers inside a pyramid. nav { ul { li { a { } } } } instead of nav ul li a. Use & for pseudo-classes: &:hover refers to the parent.

Task

Create .nav { padding: 20px; ul { list-style: none; li { display: inline; a { color: $gold; &:hover { color: lighten($gold, 20%) } } } } }. A structure as readable as a pyramid blueprint!