Created
September 14, 2016 17:35
-
-
Save iRoachie/4cd2a8d32b0891cf8ec0fe6096d1992e to your computer and use it in GitHub Desktop.
Mixins
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
@import 'vars'; | |
@mixin element($element) { | |
&__#{$element} { | |
@content; | |
} | |
} | |
@mixin modifier($element) { | |
&--#{$element} { | |
@content; | |
} | |
} | |
@mixin size($width, $height: $width) { | |
width: $width; | |
height: $height; | |
} | |
@mixin min-size($width, $height: $width) { | |
min-width: $width; | |
min-height: $height; | |
} | |
@mixin max-size($width, $height: $width) { | |
max-width: $width; | |
max-height: $height; | |
} | |
@mixin position($position, $top: null, $right: null, $bottom: null, $left: null) { | |
position: $position; | |
top: $top; | |
right: $right; | |
bottom: $bottom; | |
left: $left; | |
} | |
@mixin border($top: null, $right: null, $bottom: null, $left: null) { | |
border-top: $top; | |
border-right: $right; | |
border-bottom: $bottom; | |
border-left: $left; | |
} | |
@mixin breakpoint($breakpoint) { | |
@media (max-width: map_get($breakpoints, $breakpoint)) { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment