{"id":14172,"date":"2011-09-06T19:55:35","date_gmt":"2011-09-07T02:55:35","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14172"},"modified":"2015-03-27T08:26:27","modified_gmt":"2015-03-27T15:26:27","slug":"disabled","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/selectors\/d\/disabled\/","title":{"rendered":":disabled"},"content":{"rendered":"
The Elements that can receive the Such an element can be styled using the 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 \u201cUI element state pseudo-class\u201d, meaning it is used to style content based on the user’s interaction with an input element. Elements […]<\/p>\n","protected":false},"author":1036,"featured_media":0,"parent":14168,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"page-almanac-single.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":""},"tags":[],"acf":[],"jetpack-related-posts":[{"id":166069,"url":"https:\/\/css-tricks.com\/almanac\/selectors\/r\/read-write-read\/","url_meta":{"origin":14172,"position":0},"title":":read-write \/ :read-only","date":"March 17, 2014","format":false,"excerpt":"The :read-write and :read-only selectors are two mutability pseudo-classes aiming at making form styling easier based on disabled, readonly and contenteditable HTML Attributes. While the browser support is not that bad, the various implementations are quite wonky. According to the official CSS Specifications, a :read-write selector will match an element\u2026","rel":"","context":"In \":read-only\"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13282,"url":"https:\/\/css-tricks.com\/snippets\/jquery\/test-if-at-least-one-checkbox-is-checked\/","url_meta":{"origin":14172,"position":1},"title":"Test if at least one checkbox is checked","date":"July 12, 2011","format":false,"excerpt":"In this example, a submit button is disabled if none of the checkboxes are checked and enabled if at least one is checked. The trick is that you can use .is(\":checked\") on a jQuery object full of a bunch of elements and it'll return true if any of them are\u2026","rel":"","context":"With 8 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14180,"url":"https:\/\/css-tricks.com\/almanac\/selectors\/e\/enabled\/","url_meta":{"origin":14172,"position":2},"title":":enabled","date":"April 18, 2013","format":false,"excerpt":"The :enabled pseudo-class in CSS selects focusable elements that are not disabled, and therefore enabled. It is only associated with form elements (, :disabled<\/code> pseudo-class selector provides conditional styling to HTML elements that can receive user input, when the elements have the
disabled<\/code> attribute. It is defined in the CSS Selectors Level 3 spec<\/a> as a \u201cUI element state pseudo-class\u201d, meaning it is used to style content based on the user’s interaction with an input element.<\/p>\n
disabled<\/code> attribute include
<button><\/code>,
<input><\/code>,
<textarea><\/code>,
<optgroup><\/code>,
<option><\/code> and
<fieldset><\/code>. There are two valid syntaxes for setting this attribute: either
disabled=\"disabled\"<\/code> or (in HTML5) simply the
disabled<\/code> Boolean keyword. An element is disabled if it can’t be activated (e.g. selected, clicked on or accept text input) or accept focus.<\/p>\n
:disabled<\/code> pseudo-class selector:<\/p>\n
<\/code>Check out this Pen!<\/a><\/pre>\n
Points of Interest<\/h3>\n
\n
:disabled<\/code> can be \u201cchained\u201d with other pseudo-selectors: like
:before<\/code> or
:after<\/code> to generate icons or text to provide more user feedback.<\/li>\n
disabled<\/code> attribute is added or removed from the HTML element.<\/li>\n<\/ul>\n
Related Properties<\/h3>\n
\n
Other Resources<\/h3>\n
\n
Browser Support<\/h3>\n
\n\n
\n Chrome<\/span><\/th>\n Safari<\/span><\/th>\n Firefox<\/span><\/th>\n Opera<\/span><\/th>\n IE<\/span><\/th>\n Android<\/span><\/th>\n iOS<\/span><\/th>\n<\/tr>\n<\/thead>\n\n \n All<\/td>\n 3.1 <\/td>\n All <\/td>\n 9 <\/td>\n 9 <\/td>\n All <\/td>\n All <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"