Created
March 3, 2021 18:16
-
-
Save amelzer/13c2b13abfce9d6b3810ef16a1f253f7 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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: ( | |
'sm': 30rem, | |
'md': 52rem, | |
'lg': 68rem, | |
'xl': 84rem | |
); | |
.button { | |
@mixin loop-mq { | |
@content(''); | |
@each $key, $value in $breakpoints { | |
@media (min-width: #{$value}) { | |
@content(\@#{$key}); | |
} | |
} | |
} | |
@include loop-mq using($key){ | |
.display-inline#{$key} { | |
display: inline; | |
} | |
.display-block#{$key} { | |
display: block; | |
} | |
} | |
} | |
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
.button .display-inline { | |
display: inline; | |
} | |
.button .display-block { | |
display: block; | |
} | |
@media (min-width: 30rem) { | |
.button .display-inline\@sm { | |
display: inline; | |
} | |
.button .display-block\@sm { | |
display: block; | |
} | |
} | |
@media (min-width: 52rem) { | |
.button .display-inline\@md { | |
display: inline; | |
} | |
.button .display-block\@md { | |
display: block; | |
} | |
} | |
@media (min-width: 68rem) { | |
.button .display-inline\@lg { | |
display: inline; | |
} | |
.button .display-block\@lg { | |
display: block; | |
} | |
} | |
@media (min-width: 84rem) { | |
.button .display-inline\@xl { | |
display: inline; | |
} | |
.button .display-block\@xl { | |
display: block; | |
} | |
} |
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
{ | |
"sass": { | |
"compiler": "dart-sass/1.26.11", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment