Created
August 25, 2012 15:52
-
-
Save byrichardpowell/3467313 to your computer and use it in GitHub Desktop.
Make prefixes less painful using a preprocessor
This file contains 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
/* helpers.less */ | |
.shadow (@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) { | |
-webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
-moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
-o-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
-ms-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); | |
} | |
/* site.less */ | |
@import 'helpers.less'; | |
.box-modal { .shadow(0, 0, 5px, 0.5); } | |
/* site.css */ | |
.box-modal { -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); | |
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); | |
-o-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); | |
-ms-box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); | |
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment