CSS

Last updated on

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 includes ones in that you can select, that you can enter data into, or that you can focus on or click. So when a checkbox is checked, and you are

Continue reading →

Last updated on

The :empty pseudo selector will select elements that contain either nothing or only an HTML comment. div:empty { display: none; } Will Match <div></div> <div><!– test –></div> Will Not Match <div> </div> <div> <!– test –> </div> <div> </div> It’s useful for hiding empty elements that might cause weird spacing (e.g. they have padding). Or something like

Continue reading →

Last updated on

A descendant selector in CSS is any selector with white space between two selectors without a combinator. Here’s some examples: ul li { } header h2 { } footer a { } .module div { } #info-toggle span { } div dl dt a { } Take ul li { } for example. It means “any list item

Continue reading →

Last updated on

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

Continue reading →