eduardoboucas / include-media

📐 Simple, elegant and maintainable media queries in Sass
https://eduardoboucas.github.io/include-media/
MIT License
2.57k stars 191 forks source link

How to use AND ? #202

Closed kopax closed 3 years ago

kopax commented 3 years ago

Hello, I am working on a theme which include this library.

I want to create a mixin for landscape, for some reason, it also apply on portrait mode.

This is what I am doing:

      @include media( '>small', 'landscape' ) {
        padding: 0 1.5em;
      }
      @include media( '>small', 'portrait' ) {
        padding: 2em 3em 1em 3em;
      }

I want to force the padding to be smaller on landscape, so far I am reading the doc and it's unclear how I can do that. Thanks for helping !

jackmcpickle commented 3 years ago

Hi @kopax the default breakpoints are

  'phone': 320px,
  'tablet': 768px,
  'desktop': 1024px
) !default;

so unless you have changed them in your code - using small wont work.

also make sure you have a selector. see this gist. https://gist.github.com/jackmcpickle/55ccaadd6b613727d671e1c53d9dd434

Try playing with in https://www.sassmeister.com/

KittyGiraudel commented 3 years ago

Closing for lack of activity. :)