SASS using & for parent and that parent is first-child -


i know can specify if element has specific parent using &:

.btn {     .btn-group & {         color: blue;     } } 

but can if parent btn-group , .btn-group first child?

something like:

.btn {     .btn-group & &:first-child {         color: blue;     } } 

but doesn't seem work.

i worked out can do:

.btn {     .btn-group:first-child & {         color: blue;     } } 

but couldn't find way have multiple pseudo selectors (except using above syntax comma separated):

// doesn't work :( .btn {     .btn-group & {         &:first-child,         &:last-child {             color: blue;         }     } } 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -