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

postcss-preset-env

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-preset-env - npm Package Compare versions

Comparing version 9.0.0 to 9.1.0

74

CHANGELOG.md
# Changes to PostCSS Preset Env
### 9.1.0
_July 24, 2023_
- Added `@csstools/postcss-exponential-functions` [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-exponential-functions#readme) for usage details.
- Added `env` option to control which [browserslist environment](https://github.com/browserslist/browserslist#configuring-for-different-environments) to target
- Fix [browserslist supports queries](https://github.com/browserslist/browserslist#full-list)
- Updated [`cssdb`](https://github.com/csstools/cssdb) to [`7.7.0`](https://github.com/csstools/cssdb/blob/main/CHANGELOG.md#770-july-24-2023) (major)
- Updated [`@csstools/postcss-logical-viewport-units`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units) to [`2.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units/CHANGELOG.md#201) (patch)
- Updated [`@csstools/postcss-color-function`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-function/CHANGELOG.md#301) (patch)
- Updated [`@csstools/postcss-color-mix-function`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-mix-function) to [`2.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-mix-function/CHANGELOG.md#201) (patch)
- Updated [`@csstools/postcss-gradients-interpolation-method`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gradients-interpolation-method) to [`4.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gradients-interpolation-method/CHANGELOG.md#401) (patch)
- Updated [`@csstools/postcss-hwb-function`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-hwb-function/CHANGELOG.md#301) (patch)
- Updated [`@csstools/postcss-media-minmax`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-media-minmax) to [`1.0.6`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-media-minmax/CHANGELOG.md#106) (patch)
- Updated [`@csstools/postcss-media-queries-aspect-ratio-number-values`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-media-queries-aspect-ratio-number-values) to [`2.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-media-queries-aspect-ratio-number-values/CHANGELOG.md#201) (patch)
- Updated [`@csstools/postcss-oklab-function`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-oklab-function) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-oklab-function/CHANGELOG.md#301) (patch)
- Updated [`@csstools/postcss-relative-color-syntax`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-relative-color-syntax) to [`2.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-relative-color-syntax/CHANGELOG.md#201) (patch)
- Updated [`@csstools/postcss-stepped-value-functions`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions/CHANGELOG.md#301) (patch)
- Updated [`@csstools/postcss-trigonometric-functions`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-trigonometric-functions) to [`3.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-trigonometric-functions/CHANGELOG.md#301) (patch)
- Updated [`postcss-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-properties) to [`13.3.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-custom-properties/CHANGELOG.md#1330) (minor)
- Updated [`postcss-lab-function`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function) to [`6.0.1`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function/CHANGELOG.md#601) (patch)
### 9.0.0

@@ -8,28 +30,28 @@

- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/))
- Updated [`@csstools/postcss-cascade-layers`](/plugins/postcss-cascade-layers) to [`4.0.0`](/plugins/postcss-cascade-layers/CHANGELOG.md#400) (major)
- Updated [`@csstools/postcss-font-format-keywords`](/plugins/postcss-font-format-keywords) to [`3.0.0`](/plugins/postcss-font-format-keywords/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-is-pseudo-class`](/plugins/postcss-is-pseudo-class) to [`4.0.0`](/plugins/postcss-is-pseudo-class/CHANGELOG.md#400) (major)
- Updated [`@csstools/postcss-logical-float-and-clear`](/plugins/postcss-logical-float-and-clear) to [`2.0.0`](/plugins/postcss-logical-float-and-clear/CHANGELOG.md#200) (major)
- Updated [`@csstools/postcss-logical-resize`](/plugins/postcss-logical-resize) to [`2.0.0`](/plugins/postcss-logical-resize/CHANGELOG.md#200) (major)
- Updated [`@csstools/postcss-logical-viewport-units`](/plugins/postcss-logical-viewport-units) to [`2.0.0`](/plugins/postcss-logical-viewport-units/CHANGELOG.md#200) (major)
- Updated [`@csstools/postcss-nested-calc`](/plugins/postcss-nested-calc) to [`3.0.0`](/plugins/postcss-nested-calc/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-normalize-display-values`](/plugins/postcss-normalize-display-values) to [`3.0.0`](/plugins/postcss-normalize-display-values/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-progressive-custom-properties`](/plugins/postcss-progressive-custom-properties) to [`3.0.0`](/plugins/postcss-progressive-custom-properties/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-scope-pseudo-class`](/plugins/postcss-scope-pseudo-class) to [`3.0.0`](/plugins/postcss-scope-pseudo-class/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-text-decoration-shorthand`](/plugins/postcss-text-decoration-shorthand) to [`3.0.0`](/plugins/postcss-text-decoration-shorthand/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-unset-value`](/plugins/postcss-unset-value) to [`3.0.0`](/plugins/postcss-unset-value/CHANGELOG.md#300) (major)
- Updated [`css-blank-pseudo`](/plugins/css-blank-pseudo) to [`6.0.0`](/plugins/css-blank-pseudo/CHANGELOG.md#600) (major)
- Updated [`css-has-pseudo`](/plugins/css-has-pseudo) to [`6.0.0`](/plugins/css-has-pseudo/CHANGELOG.md#600) (major)
- Updated [`css-prefers-color-scheme`](/plugins/css-prefers-color-scheme) to [`9.0.0`](/plugins/css-prefers-color-scheme/CHANGELOG.md#900) (major)
- Updated [`postcss-color-rebeccapurple`](/plugins/postcss-color-rebeccapurple) to [`9.0.0`](/plugins/postcss-color-rebeccapurple/CHANGELOG.md#900) (major)
- Updated [`postcss-dir-pseudo-class`](/plugins/postcss-dir-pseudo-class) to [`8.0.0`](/plugins/postcss-dir-pseudo-class/CHANGELOG.md#800) (major)
- Updated [`postcss-focus-visible`](/plugins/postcss-focus-visible) to [`9.0.0`](/plugins/postcss-focus-visible/CHANGELOG.md#900) (major)
- Updated [`postcss-focus-within`](/plugins/postcss-focus-within) to [`8.0.0`](/plugins/postcss-focus-within/CHANGELOG.md#800) (major)
- Updated [`postcss-gap-properties`](/plugins/postcss-gap-properties) to [`5.0.0`](/plugins/postcss-gap-properties/CHANGELOG.md#500) (major)
- Updated [`postcss-image-set-function`](/plugins/postcss-image-set-function) to [`6.0.0`](/plugins/postcss-image-set-function/CHANGELOG.md#600) (major)
- Updated [`postcss-logical`](/plugins/postcss-logical) to [`7.0.0`](/plugins/postcss-logical/CHANGELOG.md#700) (major)
- Updated [`postcss-nesting`](/plugins/postcss-nesting) to [`12.0.0`](/plugins/postcss-nesting/CHANGELOG.md#1200) (major)
- Updated [`postcss-overflow-shorthand`](/plugins/postcss-overflow-shorthand) to [`5.0.0`](/plugins/postcss-overflow-shorthand/CHANGELOG.md#500) (major)
- Updated [`postcss-place`](/plugins/postcss-place) to [`9.0.0`](/plugins/postcss-place/CHANGELOG.md#900) (major)
- Updated [`postcss-pseudo-class-any-link`](/plugins/postcss-pseudo-class-any-link) to [`9.0.0`](/plugins/postcss-pseudo-class-any-link/CHANGELOG.md#900) (major)
- Updated [`@csstools/postcss-cascade-layers`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers) to [`4.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers/CHANGELOG.md#400) (major)
- Updated [`@csstools/postcss-font-format-keywords`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-is-pseudo-class`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-is-pseudo-class) to [`4.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-is-pseudo-class/CHANGELOG.md#400) (major)
- Updated [`@csstools/postcss-logical-float-and-clear`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-float-and-clear) to [`2.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-float-and-clear/CHANGELOG.md#200) (major)
- Updated [`@csstools/postcss-logical-resize`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-resize) to [`2.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-resize/CHANGELOG.md#200) (major)
- Updated [`@csstools/postcss-logical-viewport-units`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units) to [`2.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-viewport-units/CHANGELOG.md#200) (major)
- Updated [`@csstools/postcss-nested-calc`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nested-calc) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nested-calc/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-normalize-display-values`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-normalize-display-values) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-normalize-display-values/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-scope-pseudo-class`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-scope-pseudo-class) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-scope-pseudo-class/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-text-decoration-shorthand`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-text-decoration-shorthand) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-text-decoration-shorthand/CHANGELOG.md#300) (major)
- Updated [`@csstools/postcss-unset-value`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-unset-value) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-unset-value/CHANGELOG.md#300) (major)
- Updated [`css-blank-pseudo`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-blank-pseudo) to [`6.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-blank-pseudo/CHANGELOG.md#600) (major)
- Updated [`css-has-pseudo`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-has-pseudo) to [`6.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-has-pseudo/CHANGELOG.md#600) (major)
- Updated [`css-prefers-color-scheme`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-prefers-color-scheme) to [`9.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-prefers-color-scheme/CHANGELOG.md#900) (major)
- Updated [`postcss-color-rebeccapurple`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-rebeccapurple) to [`9.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-rebeccapurple/CHANGELOG.md#900) (major)
- Updated [`postcss-dir-pseudo-class`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-dir-pseudo-class) to [`8.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-dir-pseudo-class/CHANGELOG.md#800) (major)
- Updated [`postcss-focus-visible`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-visible) to [`9.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-visible/CHANGELOG.md#900) (major)
- Updated [`postcss-focus-within`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-within) to [`8.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-focus-within/CHANGELOG.md#800) (major)
- Updated [`postcss-gap-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gap-properties) to [`5.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-gap-properties/CHANGELOG.md#500) (major)
- Updated [`postcss-image-set-function`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function) to [`6.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-image-set-function/CHANGELOG.md#600) (major)
- Updated [`postcss-logical`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical) to [`7.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical/CHANGELOG.md#700) (major)
- Updated [`postcss-nesting`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) to [`12.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting/CHANGELOG.md#1200) (major)
- Updated [`postcss-overflow-shorthand`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-overflow-shorthand) to [`5.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-overflow-shorthand/CHANGELOG.md#500) (major)
- Updated [`postcss-place`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-place) to [`9.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-place/CHANGELOG.md#900) (major)
- Updated [`postcss-pseudo-class-any-link`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link) to [`9.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link/CHANGELOG.md#900) (major)
- Updated [`@csstools/postcss-ic-unit`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-ic-unit) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-ic-unit/CHANGELOG.md#300) (major)

@@ -36,0 +58,0 @@ - Updated [`@csstools/postcss-media-minmax`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-media-minmax) to [`1.0.5`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-media-minmax/CHANGELOG.md#105) (patch)

@@ -33,3 +33,13 @@ import type autoprefixer from 'autoprefixer';

*
* The `env` option is used to select a specific browserslist environment in the event that you have more than one.
*/
env?: string;
/**
* PostCSS Preset Env supports any standard browserslist configuration,
* which can be a `.browserslistrc` file,
* a `browserslist` key in `package.json`,
* or `browserslist` environment variables.
*
* The `browsers` option should only be used when a standard browserslist configuration is not available.
* When the `browsers` option is used the `env` option is ignored.
*/

@@ -36,0 +46,0 @@ browsers?: string | Array<string> | null;

@@ -17,2 +17,3 @@ import type { pluginOptions as postcssInitial } from '../types/postcss-initial/plugin-options';

import type { pluginOptions as postcssDoublePositionGradients } from 'postcss-double-position-gradients';
import type { pluginOptions as postcssExponentialFunctions } from '@csstools/postcss-exponential-functions';
import type { pluginOptions as postcssLogicalFloatAndClear } from '@csstools/postcss-logical-float-and-clear';

@@ -87,2 +88,4 @@ import type { pluginOptions as postcssFocusVisible } from 'postcss-focus-visible';

'double-position-gradients'?: postcssDoublePositionGradients | boolean;
/** plugin options for "@csstools/postcss-exponential-functions" */
'exponential-functions'?: postcssExponentialFunctions | boolean;
/** plugin options for "@csstools/postcss-logical-float-and-clear" */

@@ -89,0 +92,0 @@ 'float-clear-logical-values'?: postcssLogicalFloatAndClear | boolean;

{
"name": "postcss-preset-env",
"description": "Convert modern CSS into something browsers understand",
"version": "9.0.0",
"version": "9.1.0",
"contributors": [

@@ -53,7 +53,8 @@ {

"@csstools/postcss-cascade-layers": "^4.0.0",
"@csstools/postcss-color-function": "^2.2.3",
"@csstools/postcss-color-mix-function": "^1.0.3",
"@csstools/postcss-color-function": "^3.0.1",
"@csstools/postcss-color-mix-function": "^2.0.1",
"@csstools/postcss-exponential-functions": "^1.0.0",
"@csstools/postcss-font-format-keywords": "^3.0.0",
"@csstools/postcss-gradients-interpolation-method": "^4.0.0",
"@csstools/postcss-hwb-function": "^3.0.0",
"@csstools/postcss-gradients-interpolation-method": "^4.0.1",
"@csstools/postcss-hwb-function": "^3.0.1",
"@csstools/postcss-ic-unit": "^3.0.0",

@@ -63,14 +64,14 @@ "@csstools/postcss-is-pseudo-class": "^4.0.0",

"@csstools/postcss-logical-resize": "^2.0.0",
"@csstools/postcss-logical-viewport-units": "^2.0.0",
"@csstools/postcss-media-minmax": "^1.0.5",
"@csstools/postcss-media-queries-aspect-ratio-number-values": "^2.0.0",
"@csstools/postcss-logical-viewport-units": "^2.0.1",
"@csstools/postcss-media-minmax": "^1.0.6",
"@csstools/postcss-media-queries-aspect-ratio-number-values": "^2.0.1",
"@csstools/postcss-nested-calc": "^3.0.0",
"@csstools/postcss-normalize-display-values": "^3.0.0",
"@csstools/postcss-oklab-function": "^3.0.0",
"@csstools/postcss-oklab-function": "^3.0.1",
"@csstools/postcss-progressive-custom-properties": "^3.0.0",
"@csstools/postcss-relative-color-syntax": "^2.0.0",
"@csstools/postcss-relative-color-syntax": "^2.0.1",
"@csstools/postcss-scope-pseudo-class": "^3.0.0",
"@csstools/postcss-stepped-value-functions": "^3.0.0",
"@csstools/postcss-stepped-value-functions": "^3.0.1",
"@csstools/postcss-text-decoration-shorthand": "^3.0.0",
"@csstools/postcss-trigonometric-functions": "^3.0.0",
"@csstools/postcss-trigonometric-functions": "^3.0.1",
"@csstools/postcss-unset-value": "^3.0.0",

@@ -82,3 +83,3 @@ "autoprefixer": "^10.4.14",

"css-prefers-color-scheme": "^9.0.0",
"cssdb": "^7.6.0",
"cssdb": "^7.7.0",
"postcss-attribute-case-insensitive": "^6.0.2",

@@ -90,3 +91,3 @@ "postcss-clamp": "^4.1.0",

"postcss-custom-media": "^10.0.0",
"postcss-custom-properties": "^13.2.1",
"postcss-custom-properties": "^13.3.0",
"postcss-custom-selectors": "^7.1.4",

@@ -101,3 +102,3 @@ "postcss-dir-pseudo-class": "^8.0.0",

"postcss-initial": "^4.0.1",
"postcss-lab-function": "^6.0.0",
"postcss-lab-function": "^6.0.1",
"postcss-logical": "^7.0.0",

@@ -120,3 +121,3 @@ "postcss-nesting": "^12.0.0",

"@csstools/postcss-tape": "*",
"@webref/css": "^6.6.0",
"@webref/css": "^6.6.2",
"postcss-simple-vars": "^7.0.1"

@@ -123,0 +124,0 @@ },

@@ -18,3 +18,4 @@ # PostCSS Preset Env [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]

- Install `postcss-preset-env` from npm.
- Add `postcss-preset-env` to your configuration:
- Add `postcss-preset-env` to your configuration.
- Explore the [features list](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/FEATURES.md).

@@ -26,3 +27,7 @@ ```js

plugins: [
postcssPresetEnv(/* pluginOptions */)
/* other plugins */
/* remove autoprefixer if you had it here, it's part of postcss-preset-env */
postcssPresetEnv({
/* pluginOptions */
})
]

@@ -164,2 +169,29 @@ }

### Position in your PostCSS plugins list
[PostCSS Preset Env] only contains polyfills and fallbacks for standard CSS features and is unable to handle non-standard features and syntactic sugar.
If you also have PostCSS plugins for non-standard features and syntactic sugar,
you should place these first in the PostCSS plugins list.
```js
module.exports = {
plugins: [
"postcss-syntactic-sugar",
"postcss-non-standard",
// ...
[
"postcss-preset-env",
{
// plugin options
},
],
// ...
// maybe a minifier?
],
};
```
You can also use the [`insertBefore` / `insertAfter`](#insertbefore--insertafter) plugin options for more fine grained control.
## Options

@@ -182,2 +214,5 @@

**It is very rare for features to progress beyond stage `2`.**
**Use `minimumVendorImplementations` if you prefer to keep up with modern features.**
### minimumVendorImplementations

@@ -237,13 +272,24 @@

### env
[PostCSS Preset Env] supports standard [browserslist] configuration, which can
be a `.browserslistrc` file, a `browserslist` key in `package.json`, or
`browserslist` environment variables.
The `env` option is used by [browserslist] to determine the named environment
that should be used when you have [multiple browserslist environments](https://github.com/browserslist/browserslist#configuring-for-different-environments)
configured. If not set, Browserslist will use the `production` environment.
```js
/* use the environment named `development`, instead of the default environment of `production` */
postcssPresetEnv({ env: 'development' })
```
### browsers
The `browsers` option determines which polyfills are required based upon the
browsers you are supporting.
The `browsers` option overrides any existing [browserslist] configuration.
[PostCSS Preset Env] supports any standard [browserslist] configuration, which
can be a `.browserslistrc` file, a `browserslist` key in `package.json`, or
`browserslist` environment variables.
The `browsers` option should only be used when a standard browserslist
configuration is not available.
configuration is not available.
When the `browsers` option is used the `env` option will be ignored.

@@ -277,4 +323,3 @@ ```js

[PostCSS Preset Env] includes [autoprefixer] and [`browsers`](#browsers) option
will be passed to it automatically.
[PostCSS Preset Env] includes [autoprefixer]; the [`env`](#env) and [`browsers`](#browsers) options will be passed to it automatically.

@@ -281,0 +326,0 @@ Specifying the `autoprefixer` option enables passing

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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