| 1 | # Changes to Prefers Color Scheme
|
|---|
| 2 |
|
|---|
| 3 | ### 6.0.3 (January 31, 2022)
|
|---|
| 4 |
|
|---|
| 5 | - Fix `preserve: false` option.
|
|---|
| 6 |
|
|---|
| 7 | ### 6.0.2 (January 2, 2022)
|
|---|
| 8 |
|
|---|
| 9 | - Removed Sourcemaps from package tarball.
|
|---|
| 10 | - Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
|
|---|
| 11 |
|
|---|
| 12 | ### 6.0.1 (December 27, 2021)
|
|---|
| 13 |
|
|---|
| 14 | - Fixed: require/import paths for browser script
|
|---|
| 15 |
|
|---|
| 16 | ### 6.0.0 (December 13, 2021)
|
|---|
| 17 |
|
|---|
| 18 | - Breaking: require/import paths have changed
|
|---|
| 19 | - Changed: new polyfill CDN urls.
|
|---|
| 20 | - Updated: documentation
|
|---|
| 21 | - Fixed: `CSSRuleList` edits skipping rules as this is a live list.
|
|---|
| 22 | - Fixed: complex `@media` queries not working.
|
|---|
| 23 |
|
|---|
| 24 | **Migrating to 6.0.0**
|
|---|
| 25 |
|
|---|
| 26 | PostCSS plugin :
|
|---|
| 27 |
|
|---|
| 28 | ```diff
|
|---|
| 29 | - const postcssPrefersColorScheme = require('css-prefers-color-scheme/postcss');
|
|---|
| 30 | + const postcssPrefersColorScheme = require('css-prefers-color-scheme');
|
|---|
| 31 | ```
|
|---|
| 32 |
|
|---|
| 33 | Browser Polyfill :
|
|---|
| 34 |
|
|---|
| 35 | ```diff
|
|---|
| 36 | - const prefersColorScheme = require('css-prefers-color-scheme')();
|
|---|
| 37 | + const prefersColorScheme = require('css-prefers-color-scheme/browser')();
|
|---|
| 38 | ```
|
|---|
| 39 |
|
|---|
| 40 | _The old CND url is now deprecated and will be removed in a next major release._
|
|---|
| 41 | _It will continue to work for now._
|
|---|
| 42 |
|
|---|
| 43 | ```diff
|
|---|
| 44 | - <script src="https://unpkg.com/css-prefers-color-scheme/browser.min"></script>
|
|---|
| 45 | + <script src="https://unpkg.com/css-prefers-color-scheme/dist/browser-global.js"></script>
|
|---|
| 46 | ```
|
|---|
| 47 |
|
|---|
| 48 | ### 5.0.0 (September 17, 2021)
|
|---|
| 49 |
|
|---|
| 50 | - Updated: Support for PostCS 8+ (major).
|
|---|
| 51 | - Updated: Support for Node 12+ (major).
|
|---|
| 52 |
|
|---|
| 53 | ### 4.0.0 (May 24, 2019)
|
|---|
| 54 |
|
|---|
| 55 | - Updated: `postcss` to 7.0.16 (patch)
|
|---|
| 56 | - Updated: Node 8+ compatibility (major)
|
|---|
| 57 |
|
|---|
| 58 | ### 3.1.1 (November 10, 2018)
|
|---|
| 59 |
|
|---|
| 60 | - Updated: Project organization. No functional changes.
|
|---|
| 61 |
|
|---|
| 62 | ### 3.1.0 (November 10, 2018)
|
|---|
| 63 |
|
|---|
| 64 | - Include CLI tool for transforming CSS without any installation
|
|---|
| 65 | - Update documentation
|
|---|
| 66 |
|
|---|
| 67 | ### 3.0.0 (November 4, 2018)
|
|---|
| 68 |
|
|---|
| 69 | - Preserve `prefers-color-scheme` queries by default for non-JS environments
|
|---|
| 70 | - Remove `prefers-color-scheme` queries on the frontend for JS environments
|
|---|
| 71 |
|
|---|
| 72 | ### 2.0.0 (November 3, 2018)
|
|---|
| 73 |
|
|---|
| 74 | - The client library now returns an object with various features, including:
|
|---|
| 75 | - `scheme` to get or set the preferred color scheme
|
|---|
| 76 | - `hasNativeSupport` to report whether `prefers-color-scheme` is supported
|
|---|
| 77 | - `onChange` to listen for when the preferred color scheme changes
|
|---|
| 78 | - `removeListener` to destroy the native `prefers-color-scheme` listener
|
|---|
| 79 |
|
|---|
| 80 | ### 1.0.0 (September 24, 2018)
|
|---|
| 81 |
|
|---|
| 82 | - Initial version
|
|---|