Answers for "making media query scss"

CSS
0

how to use media query scss

@mixin breakpoint($size) {
    @if $size == mobile {
      @media (max-width: 599px) { @content; }
    } @else if $size == tablet-portrait-up {
      @media (min-width: 600px) { @content; }
    } @else if $size == tablet-landscape-up {
      @media (min-width: 900px) { @content; }
    } @else if $size == desktop-up {
      @media (min-width: 1200px) { @content; }
    } @else if $size == big-desktop-up {
      @media (min-width: 1800px) { @content; }
    }
}
/* used in this .scss file*/
.logo{
    &__link{
       &__img{
        @include breakpoint(mobile) {
            width:30%; 
          }
          width:20%;
          height:auto; 
       } 
    }
}
Posted by: Guest on June-28-2021

Browse Popular Code Answers by Language