.wrapper { width: 10px; &_item { &:hover { width: 20px; .wrapper_button { ???? color: black; } } } } Is it .wrapper_button use an ampersand instead of .wrapper_button ?
.wrapper { width: 10px; &_item { &:hover { width: 20px; .wrapper_button { ???? color: black; } } } } Is it .wrapper_button use an ampersand instead of .wrapper_button ?
By simple - no. You cannot select a level with an ampersand. But you can use variables:
.wrapper { $ws: &; // wrapper selector width: 10px; &_item { &:hover { width: 20px; #{$ws}_button { color: black; } } } } You can, the result is then
.wrapper { width: 10px; } .wrapper_item:hover { width: 20px; } .wrapper_item:hover { color: black; } Source: https://ru.stackoverflow.com/questions/744338/
All Articles