Socket
Socket
Sign inDemoInstall

autoprefixer

Package Overview
Dependencies
19
Maintainers
4
Versions
243
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.7.1 to 9.7.2

lib/hacks/user-select.js

4

CHANGELOG.md
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).
## 9.7.2
* Add `-ms-user-select: element` support.
* Add funding link for `npm fund`.
## 9.7.1

@@ -5,0 +9,0 @@ * Avoid unnecessary transitions in prefixed selectors (by Andrey Alexandrov).

@@ -44,2 +44,3 @@ "use strict";

Declaration.hack(require('./hacks/align-items'));
Declaration.hack(require('./hacks/user-select'));
Declaration.hack(require('./hacks/flex-shrink'));

@@ -46,0 +47,0 @@ Declaration.hack(require('./hacks/break-props'));

12

package.json
{
"name": "autoprefixer",
"version": "9.7.1",
"version": "9.7.2",
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
"keywords": ["autoprefixer", "css", "prefix", "postcss", "postcss-plugin"],
"funding": {
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
},
"author": "Andrey Sitnik <andrey@sitnik.ru>",

@@ -13,8 +17,8 @@ "license": "MIT",

"dependencies": {
"browserslist": "^4.7.2",
"caniuse-lite": "^1.0.30001006",
"browserslist": "^4.7.3",
"caniuse-lite": "^1.0.30001010",
"chalk": "^2.4.2",
"normalize-range": "^0.1.2",
"num2fraction": "^1.2.2",
"postcss": "^7.0.21",
"postcss": "^7.0.23",
"postcss-value-parser": "^4.0.2"

@@ -21,0 +25,0 @@ },

@@ -98,2 +98,4 @@ # Autoprefixer [![Cult Of Martians][cult-img]][cult]

- [Options](#options)
- [Environment variables](#environment-variables)
- [Using environment variables to support CSS Grid prefixes in Create React App](#using-environment-variables-to-support-css-grid-prefixes-in-create-react-app)
- [Grid Autoplacement support in IE](#grid-autoplacement-support-in-ie)

@@ -626,13 +628,50 @@ - [Debug](#debug)

Environment variables is useful, when you can change Autoprefixer options.
For instance, in Create React App.
Environment variables are useful, when you want to change Autoprefixer options but don't have access to config files.
[Create React App] is a good example of this.
Add variable before CLI command, which will build your CSS:
[Create React App]: (https://reactjs.org/docs/create-a-new-react-app.html#create-react-app)
```sh
AUTOPREFIXER_GRID=autoplace npm build
### Using environment variables to support CSS Grid prefixes in Create React App
1. Install the latest version of Autoprefixer and [cross-env](https://www.npmjs.com/package/cross-env):
```
npm install autoprefixer@latest cross-env --save-dev
```
See also [Browserslist environment variables].
2. Under `"browserslist"` > `"development"` in the package.json file, add `"last 1 ie version"`
```
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version",
"last 1 ie version"
]
}
```
3. Update `"scripts"` in the package.json file to the following:
```
"scripts": {
"start": "cross-env AUTOPREFIXER_GRID=autoplace react-scripts start",
"build": "cross-env AUTOPREFIXER_GRID=autoplace react-scripts build",
"test": "cross-env AUTOPREFIXER_GRID=autoplace react-scripts test",
"eject": "react-scripts eject"
},
```
Replace `autoplace` with `no-autoplace` in the above example if you prefer to disable Autoprefixer Grid autoplacement support.
Now when you run `npm start` you will see CSS Grid prefixes automatically being applied to your output CSS.
See also [Browserslist environment variables] for more examples on how to use environment variables in your project.
[Browserslist environment variables]: https://github.com/browserslist/browserslist#environment-variables

@@ -639,0 +678,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc