Created
April 29, 2017 00:06
-
-
Save kuanhsuh/5d8453ec76fb415e07140e67bc555c19 to your computer and use it in GitHub Desktop.
Mixins-Add Borders( size, color, position) && add-background-color ( color)
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 add-border($size, $color, $position){ | |
@if $position == 'all'{ | |
border: $size solid $color; | |
} @else if $position == 'top' { | |
border-top: $size solid $color; | |
} @else if $position == 'bottom' { | |
border-bottom: $size solid $color; | |
} @else if $position == 'right' { | |
border-right: $size solid $color; | |
} @else if $position == 'left' { | |
border-left: $size solid $color; | |
} @else if $position == 'top-bottom' { | |
border-top: $size solid $color; | |
border-bottom: $size solid $color; | |
} @else if $position == 'right-left' { | |
border-left: $size solid $color; | |
border-right: $size solid $color; | |
} | |
} | |
@mixin add-background($color){ | |
background: $color; | |
@if $color == $light-color { | |
color: #666; | |
} @else { | |
color: #fff; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment