0

Hello i need to create mixins for breakpoints and i want do it dynamically. So i try to crate some loop with array of breakpoints and create mixins. I have some example but it doesn't work can some one help me.

Thanks.

$breakpoints: ("768": "tablet", "576": "mobile");

@each $breakpoint, $i in $breakpoints {
    @mixin #{$i}() {
        @media screen and (max-width: #{$breakpoint}px) {
            @content;
        }
    }
}
Aram Mkrtchyan
  • 2,690
  • 4
  • 31
  • 47

0 Answers0