Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Adding readonly to the disabled styles… #30

Open
wants to merge 1 commit into from

1 participant

@mikesten

Use case:
I have a form. When the user clicks on a (fancy) submit it gets a disabled attribute. Now the button's value doesn't get submitted and the server has no way of knowing which button the user clicked. More useful is setting the button to readonly, which avoids multiple form submissions but still sends its value.

@mikesten mikesten Adding readonly to the disabled styles…
Use case:
I have a form. When the user clicks on a (fancy) submit it gets a disabled attribute. Now the button's value doesn't get submitted and the server has no way of knowing which button the user clicked. More useful is setting the button to readonly - avoids multiple form submissions but still sends its value.
40be3a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 23, 2011
  1. @mikesten

    Adding readonly to the disabled styles…

    mikesten authored
    Use case:
    I have a form. When the user clicks on a (fancy) submit it gets a disabled attribute. Now the button's value doesn't get submitted and the server has no way of knowing which button the user clicked. More useful is setting the button to readonly - avoids multiple form submissions but still sends its value.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/stylesheets/_fancy-buttons.sass
View
4 lib/stylesheets/_fancy-buttons.sass
@@ -44,7 +44,7 @@ $fb-line-height: 1.2em !default
+box-shadow(rgba(#fff, (lightness($color))/100) 0 0 .1em 1px inset)
+background-clip(padding-box)
@if $fb-allow-disabled
- &.disabled, &[disabled]
+ &.disabled, &[disabled], &.readonly, &[readonly]
+disable-fancy-button($color)
=fancy-button-allow-disable($color: $fb-color, $font-size: $fb-font-size, $radius: $fb-radius, $border-width: $fb-border-width)
@@ -128,7 +128,7 @@ $fb-line-height: 1.2em !default
&:active
color: $active
@if $fb-allow-disabled
- &.disabled, &[disabled]
+ &.disabled, &[disabled], &.readonly, &[readonly]
color: $color
// Layout the button's box
Something went wrong with that request. Please try again.