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.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
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
+
8
18
## [ 5.0.0] 2023-04-23
9
19
10
20
- 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 29
29
- [ sort] ( #sort )
30
30
- [ Custom sort function] ( #custom-sort-function )
31
31
- [ Sort configuration] ( #sort-configuration )
32
+ - [ Only Top Level] ( #only-top-level )
32
33
- [ Changelog] ( #changelog )
33
34
- [ License] ( #license )
34
35
- [ Other PostCSS plugins] ( #other-postcss-plugins )
@@ -236,6 +237,18 @@ postcss([
236
237
237
238
Or alternatively create a ` sort-css-mq.config.json ` file in the root of your project. Or add property ` sortCssMQ: {} ` in your ` package.json ` .
238
239
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
+
239
252
---
240
253
241
254
## Changelog
You can’t perform that action at this time.
0 commit comments