CSS:
button:active {
/* active css */
}
button:disabled {
opacity: 0.5;
}
HTML:
<button disabled="disabled">Ok</button>
When I click the button the browser adds the button:active state making it look like it was clicked (even though it is disabled). I swear I thought :active was only added if the button was enabled. What have I missed?
:activewill be applied to disabled buttons.active. It only saysA form control that is disabled must prevent any click events that are queued on the user interaction task source from being dispatched on the element.