@
@
@Pisht2021-07-21 17:21:36
css
@Pisht, 2021-07-21 17:21:36

What style to choose for media expressions?

Is it possible to sometimes write media expressions while adhering to the "mobile first" approach, for example, in the form:

.selector {
  @media (min-width: 768px) and (max-width: 1199px) {
    display: none;
  }
}


or should you always stick to the same mobile first style, i.e.:
.selector {
  @media (min-width: 768px)  {
    display: none;
  }
  
  @media (min-width: 1200px)  {
    display: block;
  }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question