Skip to content

Instantly share code, notes, and snippets.

@seriema
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seriema/533efffb7a45b102d145 to your computer and use it in GitHub Desktop.
Save seriema/533efffb7a45b102d145 to your computer and use it in GitHub Desktop.
LESS (CSS) arrows
// 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