Skip to content

Instantly share code, notes, and snippets.

@ninjasort
Last active August 29, 2015 14:02
Show Gist options
  • Save ninjasort/b54056bca10e6234b93a to your computer and use it in GitHub Desktop.
Save ninjasort/b54056bca10e6234b93a to your computer and use it in GitHub Desktop.
SASS Mixins
// Appearance
// Default styling to form elements
@mixin appearance ($value) {
-webkit-appearance: $value;
-moz-appearance: $value;
appearance: $value;
}
@mixin arrow($direction: up, $size: 5px, $color: #444) {
width: 0;
height: 0;
@if ($direction == left) {
border-top: $size solid transparent;
border-bottom: $size solid transparent;
border-right: $size solid $color;
}
@else if ($direction == right) {
border-top: $size solid transparent;
border-bottom: $size solid transparent;
border-left: $size solid $color;
}
@else if ($direction == down) {
border-left: $size solid transparent;
border-right: $size solid transparent;
border-top: $size solid $color;
}
@else {
border-left: $size solid transparent;
border-right: $size solid transparent;
border-bottom: $size solid $color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment