Skip to content

Instantly share code, notes, and snippets.

@murtuzaalisurti
Last active June 23, 2022 11:07
Show Gist options
  • Save murtuzaalisurti/544aa5bae0357e6ef143d29d91905229 to your computer and use it in GitHub Desktop.
Save murtuzaalisurti/544aa5bae0357e6ef143d29d91905229 to your computer and use it in GitHub Desktop.
How to vendor-prefix and minify your CSS?
*{
margin: 0;
box-sizing: border-box;
-webkit-text-size-adjust: auto;
-moz-text-size-adjust: auto;
text-size-adjust: auto;
}
postcss src/styles/*.css -u autoprefixer --dir src/prefixed --no-map
npm i autoprefixer --save-dev
*{
margin: 0;
box-sizing: border-box;
text-size-adjust: auto;
}
npm i cssnano --save-dev
*{-webkit-text-size-adjust:auto;-moz-text-size-adjust:auto;text-size-adjust:auto;box-sizing:border-box;margin:0}
postcss src/prefixed/*.css -u cssnano --dir src/minified --no-map
postcss src/styles/*.css -u autoprefixer cssnano --dir src/styles/production --no-map
npm i -g postcss-cli
npm i postcss postcss-cli --save-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment