Answer the question
In order to leave comments, you need to log in
How to set a special style priority?
Hello, I'm making a slideshow and I need all frames to default to opacity:0, except for the first one where opacity:1.
But I also need classes with animation styles to take precedence over the default ones, how can I do this ...
.slideshow {
width: 100%;
height: 100%;
@extend %animations;
& div:first-child {
opacity: 1; //дефолтный для первого, приоритетом больше чем "дефолтный для всех "
}
}
::v-deep .frame {
width: 100%;
height: 100%;
opacity: 0; //дефолтный для всех
}
Answer the question
In order to leave comments, you need to log in
You can use the default direct class selectors in CSS, and for pluggable use nested selectors. Conditionally like this:
Default:
.elementClass {
opacity: 0;
}
.parent1Class .parent2Class .elementClass {
opacity: 1;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question