Skip to content
This repository has been archived by the owner on Mar 18, 2019. It is now read-only.

Group media queries #27

Closed
dhoko opened this issue Aug 26, 2014 · 5 comments
Closed

Group media queries #27

dhoko opened this issue Aug 26, 2014 · 5 comments

Comments

@dhoko
Copy link

dhoko commented Aug 26, 2014

CSS next :

/* custom media query usage */
@media (--viewport-medium) {
  body { font-size: calc(var(--fontSize) * 1.2); }
}

/* custom media query usage */
@media (--viewport-medium) {
  p { font-size: calc(var(--fontSize) * 1.2); }
}

CSSnext generates

/* custom media query usage */
@media (max-width: 50em) {
  body { font-size: 1.2rem; }
}


/* custom media query usage */
@media (max-width: 50em) {
  p { font-size: 1.2rem; }
}

It would be nice if media queries could be grouped:

/* custom media query usage */
@media (max-width: 50em) {
  body { font-size: 1.2rem; }
  p { font-size: 1.2rem; }
}

No ?

@bloodyowl
Copy link
Contributor

that would create some issues with rules priorities

@MoOx
Copy link
Owner

MoOx commented Aug 26, 2014

It's completly useless & dangerous
Gzip does the job.
If you really want to do a such thing you will be able to plug cssnext & some other plugin like. Please follow issue #3

@MoOx MoOx closed this as completed Aug 26, 2014
@dhoko
Copy link
Author

dhoko commented Aug 26, 2014

with a plugin it's ok, but yeah it can be dangerous 😿

@Mannaio
Copy link

Mannaio commented Apr 10, 2016

@dhoko https://github.com/hail2u/node-css-mqpacker can do the job for you

@MoOx
Copy link
Owner

MoOx commented Apr 10, 2016

Like I said, bad practice ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants