Answers for "jss media queries"

CSS
2

media queries 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: 768px) { @content; }
    } @else if $size == laptop-desktop {
      @media (min-width: 992px) { @content; }
    } @else if $size == extra-large-devices {
      @media (min-width: 1200px) { @content; }
    }
}

.header{
    height: 10vh;
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid black;
}
Posted by: Guest on May-03-2021
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