Skip to content
Advertisement

how to remove top or root class from child element

I am trying to transpile this scss to css

input

JavaScript

output

JavaScript

expected output

JavaScript

In my output .abc class added in all item . I want it should add only on top element ?

how to remove .abc class from child element

Advertisement

Answer

It’s not possible using the parent selector. The only way I can think of is to store the .slider class in your root variable instead:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement