Z
Z
ZuGGx2017-07-25 19:57:53
Sass
ZuGGx, 2017-07-25 19:57:53

How do pseudo classes work in Sass?

In the main.sass document, I can't figure out how to apply the first-child or nth-child pseudo-class .
&:hover, active, focus , etc. are great.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolay, 2017-07-25
@nickolyashka

&:first-child, &:nth-child(1)

A
Alexander Pushkarev, 2017-07-25
@AXP-dev

Everything is working

&:first-child { ... }
&:nth-child(2n) { ... }

Example https://codepen.io/AXP/pen/PKwOQo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question