at-import / breakpoint

Really simple media queries in Sass
MIT License
2.09k stars 142 forks source link

Can media queries be grouped in css? #179

Open RustBeard opened 7 years ago

RustBeard commented 7 years ago

Already with this sass eg.:

.foo {
  @include breakpoint($large) {
    color: #333;
  }
}
.bar {
  @include breakpoint($large) {
    display: none;
  }
}

compiles to css:

@media (min-width: 1200px) {
  .foo {
    color: #333;
  }
}
@media (min-width: 1200px) {
  .bar {
    display: none;
  }
}

So - can it be grouped and compiled to:

@media (min-width: 1200px) {
  .foo {
    color: #333;
  }
  .bar {
    display: none;
  }
}

It saves some css file size.

intermundos commented 7 years ago

I use css-mqpacker, works really well with breakpoint.