Skip to content

Instantly share code, notes, and snippets.

@rtivital
Last active October 23, 2015 22:31
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 rtivital/1a03a2c2b05326d4213b to your computer and use it in GitHub Desktop.
Save rtivital/1a03a2c2b05326d4213b to your computer and use it in GitHub Desktop.
Создание CSS стрелок из элемента
@mixin arrow($dir: 'down', $size: 4px, $color: #000) {
width: 0;
height: 0;
border-style: solid;
border-color: transparent;
@if ($dir == 'up' or $dir == 'down') {
border-left-width: $size;
border-right-width: $size;
}
@if ($dir == 'right' or $dir == 'left') {
border-top-width: $size;
border-bottom-width: $size;
}
@if ($dir == 'up') {
border-bottom-width: $size;
border-bottom-color: $color;
}
@if ($dir == 'down') {
border-top-width: $size;
border-top-color: $color;
}
@if ($dir == 'right') {
border-left-width: $size;
border-left-color: $color;
}
@if ($dir == 'left') {
border-right-width: $size;
border-right-color: $color;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment