I hope you can help me, for years I have been using Stylus as a CSS preprocessor but unfortunately the community is very small, I am currently switching to Sass and I want to migrate a complete project from Stylus to Sass, in the middle of the migration a problem arose and I would like to know how to do this in Sass.
.service_list_item
display: grid
position: relative
padding: 0 1.072rem
justify-items: center
&:hover
& ^[0]_icon // <=== This line
background-color: $accentColor
The line I left selected I am pointing to the parent of the class and concatenating "_icon" to create a new class that compiled would look like this.
.service_list_item {
display: grid;
position: relative;
padding: 0 1.072rem;
justify-items: center;
}
.service_list_item:hover .service_list_item_icon {
background-color: #e3c1c1;
}
Thank you for your help.