postcss-sorting
postcss-sorting copied to clipboard
Feature request: sort simple media queries by query parameter values
Thanks for the great postcss plugin! Having some trouble with Bootstrap that uses the fact that only the last matching rule is used in browser:
@media (min-width: 768px) { .col-md-2: { width: 16%; } }
@media (min-width: 992px) { .col-lg-3: { width: 25%: } }
Sorting them in the wrong order breaks them. Not sure if it might be possible to sort simple media queries that contain only a min-width or a max-width query by numbers. Something like this:
@media (min-width: 576px) { ... }
@media (max-width: 767.98px) { ... }
@media (min-width: 768px) { ... }
... more complex queries