Skip to content

Commit 9ab9f6a

Browse files
committed
Update README and CHANGELOG
1 parent 6d05c73 commit 9ab9f6a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and 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.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
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

237238
Or 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

0 commit comments

Comments
 (0)