Answer the question
In order to leave comments, you need to log in
Why are properties not applied in SCSS?
There is an element and a pseudo-class. If the element has an active class, then the pseudo-element needs to be slightly rotated. But for some reason the rules don't apply. Where do I spit?
&-head {
position: relative;
padding: 28px 0;
font-size: 24px;
font-weight: 600;
text-transform: uppercase;
cursor: pointer;
&::before {
content: '';
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
right: 10px;
width: 30px;
height: 30px;
background: url(/build/image/x.svg) 0 0 no-repeat;
background-size: cover;
}
&.active &::before {
transform: translateY(-50%) rotate(45deg);
background-color: red;
}
}
&.active span {свойства}
, then the rules take effect on the span, but not on the pseudo-element. It also does not affect the element itself, if you do &.active & {свойства}
.
Answer the question
In order to leave comments, you need to log in
I am surprised by such questions. Are you too lazy to look at the compiled css to find your mistake?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question