Skip to content

Commit

Permalink
Fixed the disabled state for different button types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Smiley committed Jul 19, 2012
1 parent 61a94fa commit 7f5a33e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
7 changes: 7 additions & 0 deletions marketing/stylesheets/docs/presentation.css
Expand Up @@ -513,6 +513,13 @@ p.vevent abbr { cursor: default; text-decoration: none; font-weight: bold; borde
.button.full-width { width: 100%; text-align: center; padding-left: 0 !important; padding-right: !important; }
.button.left-align { text-align: left; text-indent: 12px; }
.button.disabled, .button[disabled] { opacity: 0.6; cursor: default; background: #2ba6cb; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
.button.disabled :hover, .button[disabled] :hover { background: #2ba6cb; }
.button.disabled.success, .button[disabled].success { background-color: #5da423; }
.button.disabled.success:hover, .button[disabled].success:hover { background-color: #5da423; }
.button.disabled.alert, .button[disabled].alert { background-color: #c60f13; }
.button.disabled.alert:hover, .button[disabled].alert:hover { background-color: #c60f13; }
.button.disabled.secondary, .button[disabled].secondary { background-color: #e9e9e9; }
.button.disabled.secondary:hover, .button[disabled].secondary:hover { background-color: #e9e9e9; }

/* Don't use native buttons on iOS */
input[type=submit].button, button.button { -webkit-appearance: none; }
Expand Down
7 changes: 7 additions & 0 deletions marketing/stylesheets/index.css
Expand Up @@ -513,6 +513,13 @@ p.vevent abbr { cursor: default; text-decoration: none; font-weight: bold; borde
.button.full-width { width: 100%; text-align: center; padding-left: 0 !important; padding-right: !important; }
.button.left-align { text-align: left; text-indent: 12px; }
.button.disabled, .button[disabled] { opacity: 0.6; cursor: default; background: #2ba6cb; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
.button.disabled :hover, .button[disabled] :hover { background: #2ba6cb; }
.button.disabled.success, .button[disabled].success { background-color: #5da423; }
.button.disabled.success:hover, .button[disabled].success:hover { background-color: #5da423; }
.button.disabled.alert, .button[disabled].alert { background-color: #c60f13; }
.button.disabled.alert:hover, .button[disabled].alert:hover { background-color: #c60f13; }
.button.disabled.secondary, .button[disabled].secondary { background-color: #e9e9e9; }
.button.disabled.secondary:hover, .button[disabled].secondary:hover { background-color: #e9e9e9; }

/* Don't use native buttons on iOS */
input[type=submit].button, button.button { -webkit-appearance: none; }
Expand Down
7 changes: 7 additions & 0 deletions marketing/stylesheets/presentation.css
Expand Up @@ -513,6 +513,13 @@ p.vevent abbr { cursor: default; text-decoration: none; font-weight: bold; borde
.button.full-width { width: 100%; text-align: center; padding-left: 0 !important; padding-right: !important; }
.button.left-align { text-align: left; text-indent: 12px; }
.button.disabled, .button[disabled] { opacity: 0.6; cursor: default; background: #2ba6cb; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; }
.button.disabled :hover, .button[disabled] :hover { background: #2ba6cb; }
.button.disabled.success, .button[disabled].success { background-color: #5da423; }
.button.disabled.success:hover, .button[disabled].success:hover { background-color: #5da423; }
.button.disabled.alert, .button[disabled].alert { background-color: #c60f13; }
.button.disabled.alert:hover, .button[disabled].alert:hover { background-color: #c60f13; }
.button.disabled.secondary, .button[disabled].secondary { background-color: #e9e9e9; }
.button.disabled.secondary:hover, .button[disabled].secondary:hover { background-color: #e9e9e9; }

/* Don't use native buttons on iOS */
input[type=submit].button, button.button { -webkit-appearance: none; }
Expand Down
14 changes: 13 additions & 1 deletion stylesheets/foundation/buttons.scss
Expand Up @@ -44,7 +44,19 @@
&.left-align { text-align: left; text-indent: 12px; }

/* Disabled ---------- */
&.disabled, &[disabled] { opacity: 0.6; cursor: default; background: $mainColor; @include box-shadow(none); }
&.disabled, &[disabled] { opacity: 0.6; cursor: default; background: $mainColor; @include box-shadow(none);
:hover { background: $mainColor; }

&.success { background-color: $successColor;
&:hover { background-color: $successColor; }
}
&.alert { background-color: $alertColor;
&:hover { background-color: $alertColor; }
}
&.secondary { background-color: $secondaryColor;
&:hover { background-color: $secondaryColor; }
}
}
}

/* Don't use native buttons on iOS */
Expand Down
4 changes: 4 additions & 0 deletions test.html
Expand Up @@ -83,6 +83,10 @@ <h5>Touch Detection</h5>
<a href="" class="success button">Publish</a>
</p>

<p>
<a href="" class="disabled button">Publish</a> <a href="" class="disabled success button">Publish</a> <a href="" class="disabled alert button">Publish</a> <a href="" class="disabled secondary button">Publish</a>
</p>

<ul class="radius button-group">
<li>
<a href="" class="button">Save</a>
Expand Down

0 comments on commit 7f5a33e

Please sign in to comment.