Last active
October 23, 2015 22:31
-
-
Save rtivital/1a03a2c2b05326d4213b to your computer and use it in GitHub Desktop.
Создание CSS стрелок из элемента
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
@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