SE7ENSKY / group-css-media-queries

CSS postprocessing: group media queries. Useful for postprocessing preprocessed CSS files.
MIT License
100 stars 19 forks source link

Update index.js to support non-integer min-width and max-width #16

Open axryp opened 7 years ago

axryp commented 7 years ago

Expanded code to support non-integer min-width / max-width, e.g. @media (min-width: 61.25em)

DonGissel commented 6 years ago

Please, for the love of god, merge this!

DonGissel commented 6 years ago

@ivankravchenko? Please?

larsmunkholm commented 6 years ago

I need this too

Tyree commented 6 years ago

Is this project dead? Really need this merged or I can't use it. :-/

Tyree commented 6 years ago

@axryp Have you tested this? I tried adding your changes to the index.js file in my node_modules and it still doesn't put the queries in the correct order. If I change the em values to px, it does. Any ideas? It seems to put all the floating points in order, but it puts integers above. So, I end up with 50em, then 87.5, 78.125, 37.5em. It puts the integer before the floating points. If I change 50 to 50.01, it goes into the correct place. Also doesn't play nice if you have a px based query mixed in.