Created
September 17, 2021 17:25
-
-
Save khamer/617fb01ec14b87fb10fa2d34acb45faf 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
@mixin at($bp, $rule: min-width) { | |
@if map-has-key($breakpoints, $bp) { | |
$bp: map-get($breakpoints, $bp); | |
} | |
@media screen and (#{$rule}: $bp) { | |
@content; | |
} | |
} | |
@mixin at-each($map...) { | |
@each $bp, $arg in $map { | |
@if $arg { | |
@include at($bp) { | |
@content($arg); | |
} | |
} @else { | |
@content($bp); | |
} | |
} | |
} | |
$breakpoints: ( | |
md: 616px, | |
md-1: 865px, | |
lg: 1000px, | |
xl: 1288px, | |
); | |
.heading { | |
@include at-each(2rem, md 2.25rem, lg 2.5rem, xl 3rem) using ($size) { | |
font-size: $size; | |
} | |
} |
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
.heading { | |
font-size: 2rem; | |
} | |
@media screen and (min-width: 616px) { | |
.heading { | |
font-size: 2.25rem; | |
} | |
} | |
@media screen and (min-width: 1000px) { | |
.heading { | |
font-size: 2.5rem; | |
} | |
} | |
@media screen and (min-width: 1288px) { | |
.heading { | |
font-size: 3rem; | |
} | |
} |
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.32.12", | |
"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