.site-header
.basket
position: relative
&-container
width: 100%
padding: 0 18px
$basket: &
&.opened
#{$basket}-link
border: 1px solid #e5e5e5
border-bottom: 1px solid white
#{$basket}-wrapper
visibility: visible
opacity: 1
I would like to include an opened state for the basket.
I am looking to generate .site-header .basket.opened .basket-wrapper
However, what I ended up with was .site-header .basket.opened .site-header .basket-wrapper
The issue seems to be that & contains .site-header. How can I correct this and have $basket retain its current class?
I just wanted to avoid having to repeatedly write 'basket'
.site-header
.basket
position: relative
.basket-container
width: 100%
padding: 0 18px
.basket.opened
.basket-link
border: 1px solid #e5e5e5
border-bottom: 1px solid white
.basket-wrapper
visibility: visible
opacity: 1