File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 5.2.0] 2023-05-30
9+
10+ - Add [ ` onlyTopLevel ` ] ( README.md#only-top-level ) option prevent eject nested media queries from parent
11+
12+ ## [ 5.1.0] 2023-04-25
13+
14+ - Added tests for CSS Level 4 range type media query
15+ - Fix broken eslint tests
16+ - Bump yaml and lint-staged
17+
818## [ 5.0.0] 2023-04-23
919
1020- Adds [ Media Queries Level 4] ( https://www.w3.org/TR/mediaqueries-4/ ) - [ "range"] ( https://www.w3.org/TR/mediaqueries-4/#mq-ranges ) type feature.
Original file line number Diff line number Diff line change 2929 - [ sort] ( #sort )
3030 - [ Custom sort function] ( #custom-sort-function )
3131 - [ Sort configuration] ( #sort-configuration )
32+ - [ Only Top Level] ( #only-top-level )
3233 - [ Changelog] ( #changelog )
3334 - [ License] ( #license )
3435 - [ Other PostCSS plugins] ( #other-postcss-plugins )
@@ -236,6 +237,18 @@ postcss([
236237
237238Or alternatively create a ` sort-css-mq.config.json ` file in the root of your project. Or add property ` sortCssMQ: {} ` in your ` package.json ` .
238239
240+ ### Only Top Level
241+
242+ Sort only top level media queries to prevent eject nested media queries from parent node
243+
244+ ``` js
245+ postcss ([
246+ sortMediaQueries ({
247+ onlyTopLevel: true ,
248+ })
249+ ]).process (css);
250+ ```
251+
239252---
240253
241254## Changelog
You can’t perform that action at this time.
0 commit comments