Created
          August 5, 2013 06:54 
        
      - 
      
- 
        Save logicaroma/6153960 to your computer and use it in GitHub Desktop. 
    less function for creating pseudo class stylig for a button object
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Button pseudo states | |
| // ------------------------- | |
| // Easily pump out default styles, as well as :hover, :focus, :active, | |
| // and disabled options for all buttons | |
| .btn-pseudo-states(@color; @background; @border) { | |
| color: @color; | |
| background-color: @background; | |
| border-color: @border; | |
| &:hover, | |
| &:focus, | |
| &:active, | |
| &.active { | |
| background-color: darken(@background, 5%); | |
| border-color: darken(@border, 10%); | |
| } | |
| &.disabled, | |
| &[disabled], | |
| fieldset[disabled] & { | |
| &, | |
| &:hover, | |
| &:focus, | |
| &:active, | |
| &.active { | |
| background-color: @background; | |
| border-color: @border | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment