Created
November 1, 2021 19:07
-
-
Save nicubarbaros/ec6ba6119e41703e1a3d184ac64ee728 to your computer and use it in GitHub Desktop.
A personal list of mixins I am using
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
$breakpoints: ( | |
'phone': 400px, | |
'phone-wide': 480px, | |
'phablet': 560px, | |
'tablet-small': 640px, | |
'tablet': 768px, | |
'tablet-wide': 1024px, | |
'desktop': 1248px, | |
'desktop-wide': 1440px, | |
'desktop-large': 1680px | |
); | |
@mixin mq($width, $type: min) { | |
@if map_has_key($breakpoints, $width) { | |
$width: map_get($breakpoints, $width); | |
} | |
@if $type == min { | |
$width: $width - 1px; | |
} | |
@media only screen and (#{$type}-width: $width) { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment