Skip to content

Instantly share code, notes, and snippets.

@yeasin2002
Last active June 7, 2022 19:10
Show Gist options
  • Save yeasin2002/4f1ebc0beaa5fd8d7311d7fe5d5404a6 to your computer and use it in GitHub Desktop.
Save yeasin2002/4f1ebc0beaa5fd8d7311d7fe5d5404a6 to your computer and use it in GitHub Desktop.

Initialize npm empty file

npm init -y

Install postcss

npm install -D  postcss  postcss-cli autoprefixer cssnano cssnano-preset-advanced

use this postcss.config.json file

module.exports = {
  plugins: {
    autoprefixer: {},
    cssnano: {
      preset: "advanced",
    },
  },
};

use this in package.json on script tag

"build": "postcss ./src/style.pcss  -o ./public/style.css -w"

Install PostCSS Intelligence and Highlighting - vs code Extension

Write This code in workspace setting.json

"postcss.validate": false,
"emmet.includeLanguages": {
"postcss": "css",
}

More Info:

Some PostCSS plugging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment