Breakpoint sass mixin

Very very simple HTML SASS Why the breakpoint does not work and does not change the background and does not expand the size of the table HTML <table >nocontent</table>

CSS

$lg: 992px;
$xl: 1200px;
$xxl: 1400px;

$md : 768px;
@mixin for-up($size) {

  @media screen and (max-device-width: $size) {
    @content;

  }

  .table-main {
    height: 100vh;
    border: greenyellow solid;

    @include for-up($sm)
    {
      background-color: black;
      width: 100%;
      max-width: none;
    }
  }
}

1 answer

  • answered 2022-01-19 16:57 Mirza Irtiza

    $md : 768px;
    @mixin for-up($size) {
    
      @media screen and (max-device-width: $size) {
        @content;
    
      }
    
    .table-main {
      height: 100vh;
      border: greenyellow solid;
    
    @include for-up($md)
      {
          background-color: black;
          width: 100%;
          max-width: none;
      }
      }
    }
    

    just add the proper starting and closing brackets, and than you good to go.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum