I have the following code to target buttons that are in a disable state:
.btn-default[disabled] {
background-color: lighten(@btn-default-bg, 30%)
}
Is it possible to use nested rules to target the disabled attribute? something similar to &:Hover
Definition and Usage A disabled input element is unusable and un-clickable. The disabled attribute can be set to keep a user from using the <input> element until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the disabled value, and make the <input> element usable.
To disable div element and everything inside with CSS, we set the pointer-events CSS property of the div to none . to disable pointer events on the div with pointer-events set to none with CSS.
There is no disabled attribute like this (<a href="#" disabled>) for "a" tag. you can try disabling using css so just add class in your "a" tag & then disable using css.
You can indeed, like this:
.btn-default {
&[disabled] {
background-color: lighten(@btn-default-bg, 30%)
}
}
http://jsbin.com/aKuLire/1/edit
You can even do further nesting:
input {
&[type="submit"] {
&[disabled] {
background: @blue;
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With