The :enabled pseudo-class in CSS selects focusable elements that are not disabled, and therefore enabled. It is only associated with form elements (input, select, textarea). Enabled elements include ones in that you can select, that you can enter data into, or that you can focus on or click.
In theory, :enabled should match an a, area, or link with href attributes, but browsers don’t seem to handle that scenario. You can style button, input, textarea, optgroup, option and fieldsets that are not disabled. When menu is supported, we should also be able to target command and li‘s that are children of menu, if not disabled.
You would also think that elements with contenteditable and tabindex attributes would be selectable with the :enabled pseudo-class.
A descendant selector in CSS is any selector with white space between two selectors without a combinator.
Descendant means anywhere nested within it in the DOM tree. Could be a direct child, could be five levels deep, it is still a descendant. This is different than a child combinator which requires the element to be the next nested level down.
The descendant selector is the most expensive selector in CSS. It is dreadfully expensive—especially if the selector is in the Tag or Universal Category.
The :disabled pseudo-class selector provides conditional styling to HTML elements that can receive user input, when the elements have the disabled attribute.
It is defined in the CSS Selectors Level 3 spec as a “UI element state pseudo-class”, meaning it is used to style content based on the user’s interaction with an input element.
Elements that can receive the disabled attribute include button, input, textarea, optgroup, option and fieldset.
There are two valid syntaxes for setting this attribute: either disabled=”disabled” or (in HTML5) simply the disabled Boolean keyword. An element is disabled if it can’t be activated (e.g. selected, clicked on or accept text input) or accept focus. Such an element can be styled using the :disabled pseudo-class selector.