postcss-sort-media-queries
Advanced tools
Comparing version 1.0.5 to 1.0.6
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
All notable changes to this project will be documented in this file. | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
## [1.0.5] - 2019-10-25 | ||
- Added [custom sort function](README.md#custom-sort-function) example to README.md | ||
## 1.0.5 | ||
@@ -6,0 +13,0 @@ |
{ | ||
"name": "postcss-sort-media-queries", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "PostCSS plugin for combine and sort CSS media queries with mobile first or desktop first methods.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -164,2 +164,17 @@ # PostCSS Sort Media Queries | ||
#### Custom sort function | ||
```js | ||
postcss([ | ||
sortMediaQueries({ | ||
function(a, b) { | ||
return a.localeCompare(b); | ||
} | ||
}) | ||
]).process(css); | ||
``` | ||
In this example, all your media queries will sort by A-Z order. | ||
This sorting function is directly passed to Array#sort() method of an array of all your media queries. | ||
## Changelog | ||
@@ -166,0 +181,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17041
195