Commit 5e102e26 authored by Mark Otto's avatar Mark Otto

Merge pull request #50 from twbs/disabled-pseudo

use :disabled pseudo-class instead of [disabled] attribute
parents c14823bd 9a647766
This diff is collapsed.
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
} }
&.disabled, &.disabled,
&[disabled], &:disabled,
fieldset[disabled] & { fieldset[disabled] & {
pointer-events: none; // Future-proof disabling of clicks pointer-events: none; // Future-proof disabling of clicks
cursor: $cursor-disabled; cursor: $cursor-disabled;
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
&, &,
&:active, &:active,
&.active, &.active,
&[disabled], &:disabled,
fieldset[disabled] & { fieldset[disabled] & {
background-color: transparent; background-color: transparent;
@include box-shadow(none); @include box-shadow(none);
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
text-decoration: underline; text-decoration: underline;
background-color: transparent; background-color: transparent;
} }
&[disabled], &:disabled,
fieldset[disabled] & { fieldset[disabled] & {
&:hover, &:hover,
&:focus { &:focus {
......
...@@ -141,7 +141,7 @@ output { ...@@ -141,7 +141,7 @@ output {
// HTML5 says that controls under a fieldset > legend:first-child won't be // HTML5 says that controls under a fieldset > legend:first-child won't be
// disabled if the fieldset is disabled. Due to implementation difficulty, we // disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway. // don't honor that edge case; we style them as disabled anyway.
&[disabled], &:disabled,
&[readonly], &[readonly],
fieldset[disabled] & { fieldset[disabled] & {
cursor: $cursor-disabled; cursor: $cursor-disabled;
...@@ -264,7 +264,7 @@ input[type="search"] { ...@@ -264,7 +264,7 @@ input[type="search"] {
// Note: Neither radios nor checkboxes can be readonly. // Note: Neither radios nor checkboxes can be readonly.
input[type="radio"], input[type="radio"],
input[type="checkbox"] { input[type="checkbox"] {
&[disabled], &:disabled,
&.disabled, &.disabled,
fieldset[disabled] & { fieldset[disabled] & {
cursor: $cursor-disabled; cursor: $cursor-disabled;
......
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
&:focus { &:focus {
color: $navbar-default-link-hover-color; color: $navbar-default-link-hover-color;
} }
&[disabled], &:disabled,
fieldset[disabled] & { fieldset[disabled] & {
&:hover, &:hover,
&:focus { &:focus {
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
color: $navbar-inverse-link-hover-color; color: $navbar-inverse-link-hover-color;
} }
&[disabled], &:disabled,
fieldset[disabled] & { fieldset[disabled] & {
&:hover, &:hover,
&:focus { &:focus {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
} }
&.disabled, &.disabled,
&[disabled], &:disabled,
fieldset[disabled] & { fieldset[disabled] & {
&, &,
&:hover, &:hover,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment