Rahil
Rahil

Reputation: 13

LESS nesting multuple psuedo elements/classes not working

I'm trying to get the output:

#parent a:hover,
#parent a:link,
#parent a:visited {
    color: #000;
}

I am using this LESS:

#parent {
    a {
        :link, :hover, :visited {
            color: #000;
         }
    }
}

it's not working.

Upvotes: 1

Views: 33

Answers (1)

Josh Crozier
Josh Crozier

Reputation: 240928

You need to use the LESS parent selector &:

#parent a {
  &:link, &:hover, &:visited {
    color: #000;
  }
}

Upvotes: 1

Related Questions