Last active
          December 15, 2015 11:29 
        
      - 
      
- 
        Save stephen-james/5253090 to your computer and use it in GitHub Desktop. 
    Useful .LESS css mixins
  
        
  
    
      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
    
  
  
    
  | .flex-box(@pack, @align, @orient) | |
| { | |
| display:-moz-box; | |
| -moz-box-pack:@pack; | |
| -moz-box-align:@align; | |
| -moz-box-orient: @orient; | |
| display:-webkit-box; | |
| -webkit-box-pack:@pack; | |
| -webkit-box-align:@align; | |
| -webkit-box-orient:@orient; | |
| display:box; | |
| box-pack:@pack; | |
| box-align:@align; | |
| box-orient:@orient; | |
| /* for IE support (pre-10) use shim from https://github.com/doctyper/flexie */ | |
| } | |
| .box-sizing(@sizingModel) | |
| { | |
| -webkit-box-sizing: @sizingModel; | |
| -moz-box-sizing: @sizingModel; | |
| box-sizing: @sizingModel; | |
| } | |
| .background-gradient(@startColour, @endColour) | |
| { | |
| background: mix(@startColour, @endColour, 50%); | |
| background-image: -webkit-gradient(linear,left top,left bottom,from( @startColour ),to( @endColour )); | |
| background-image: -webkit-linear-gradient( @startColour,@endColour ); | |
| background-image: -moz-linear-gradient( @startColour,@endColour ); | |
| background-image: -ms-linear-gradient( @startColour,@endColour ); | |
| background-image: -o-linear-gradient( @startColour,@endColour ); | |
| background-image: linear-gradient( @startColour,@endColour ); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment