K
K
kherel2016-10-25 11:10:41
Sass
kherel, 2016-10-25 11:10:41

Is it possible in scss to have a selector with multiple ampersands?

how to use ampersand twice in
css selector the result should be like this:

root_social.root_last{
    color: red;
}

scss with one ampersand works
.root{ 
    &_social.root_last{
        color: red;
    }
}

&_social&_last - doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mike Syomin, 2016-10-25
@kenzokikenzoki

try

.root{ 
    &_social#{&}_last{
      color: red;
    }
}

Read
https://css-tricks.com/the-sass-ampersand/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question