Last active
August 29, 2015 14:03
-
-
Save seriema/533efffb7a45b102d145 to your computer and use it in GitHub Desktop.
LESS (CSS) arrows
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
// Arrow mixins. We repeat properties so they can override each other. | |
// Should be using :extend() instead of mixin, but Web Essentials chokes on that. | |
.arrow-base(@size) { | |
width: 0; | |
height: 0; | |
border: @size solid transparent; | |
} | |
.arrow-up(@size, @color) { | |
.arrow-base(@size); | |
border-top-style: none; | |
border-bottom-color: @color; | |
} | |
.arrow-down(@size, @color) { | |
.arrow-base(@size); | |
border-bottom-style: none; | |
border-top-color: @color; | |
} | |
.arrow-right(@size, @color) { | |
.arrow-base(); | |
border-right-style: none; | |
border-left-color: @color; | |
} | |
.arrow-left(@size, @color) { | |
.arrow-base(); | |
border-left-style: none; | |
border-right-color: @color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment