Answer the question
In order to leave comments, you need to log in
Why doesn't scss work with input:invalid?
#form-registry input:invalid .button {
pointer-events: none;
}
#form-registry input:invalid + .button {
pointer-events: none;
}
#form-registry input:invalid {
.button {
pointer-events: none;
}
}
#form-registry input:invalid {
&.button {
pointer-events: none;
}
}
@if (#form-registry input:invalid) {
.button {
pointer-events: none; // в этом случаем кнопка отключается
}
} @else {
.button {
pointer-events: all; // но это условие уже не работает
}
}
Answer the question
In order to leave comments, you need to log in
#form-registry input:invalid .button
is a meaningless selector. Input cannot contain other elements within itself.
#form-registry input:invalid {
.button {
pointer-events: none;
}
}
#form-registry input:invalid {
&.button {
pointer-events: none;
}
}
#form-registry input:invalid + .button
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question