Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-sort-media-queries

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-sort-media-queries - npm Package Compare versions

Comparing version 3.12.13 to 4.0.0

4

CHANGELOG.md

@@ -8,2 +8,6 @@ # Change Log

## [4.0.0] 2021-09-13
- Add [sort-css-media-queries#configuration-options](https://github.com/dutchenkoOleg/sort-css-media-queries#configuration-options) support
## [3.12.13] 2021-09-12

@@ -10,0 +14,0 @@

13

index.js

@@ -1,4 +0,2 @@

const sortCSSmq = require('sort-css-media-queries')
function sortAtRules (queries, sort) {
function sortAtRules(queries, sort, sortCSSmq) {
if (typeof sort !== 'function') {

@@ -12,5 +10,7 @@ sort = sort === 'desktop-first' ? sortCSSmq.desktopFirst : sortCSSmq

module.exports = (opts = {}) => {
opts = Object.assign(
{
sort: 'mobile-first'
sort: 'mobile-first',
configuration: false,
},

@@ -20,2 +20,5 @@ opts

const createSort = require('sort-css-media-queries/lib/create-sort');
const sortCSSmq = opts.configuration ? createSort(opts.configuration) : require('sort-css-media-queries');
return {

@@ -45,3 +48,3 @@ postcssPlugin: 'postcss-sort-media-queries',

sortAtRules(Object.keys(atRules), opts.sort).forEach(query => {
sortAtRules(Object.keys(atRules), opts.sort, sortCSSmq).forEach(query => {
root.append(atRules[query])

@@ -48,0 +51,0 @@ })

{
"name": "postcss-sort-media-queries",
"version": "3.12.13",
"version": "4.0.0",
"description": "PostCSS plugin for combine and sort CSS media queries with mobile first or desktop first methods.",

@@ -84,3 +84,6 @@ "keywords": [

}
},
"sortCssMQ": {
"unitlessMqAlwaysFirst": false
}
}

@@ -183,2 +183,20 @@ # PostCSS Sort Media Queries

### Sort configuration
By this configuration you can control sorting behaviour.
```js
postcss([
sortMediaQueries({
configuration: {
unitlessMqAlwaysFirst: true, // or false
}
})
]).process(css);
```
Or alternatively create a `sort-css-mq.config.json` file in the root of your project. Or add property `sortCssMQ: {}` in your `package.json`.
---
## Changelog

@@ -185,0 +203,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc