Questions tagged [postcss]

PostCSS is a tool for transforming styles with JavaScript plugins. These plugins can support variables, mixins, transpile future CSS syntax, inline images, and more.

PostCSS is used by industry leaders including Google, Twitter, Alibaba, and Shopify. The Autoprefixer PostCSS plugin is one of the most popular CSS processors.

PostCSS can do the same work as preprocessors like Sass, Less, and Stylus. But PostCSS is modular, 3-30 times faster, and much more powerful.

1028 questions
11
votes
3 answers

Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.0, but postcss-preset-env uses 7.0.36

Unknown error from PostCSS plugin. Your current PostCSS version is 8.3.0, but postcss-preset-env uses 7.0.36. any one knows why this error is happening?
digish a d
  • 441
  • 1
  • 6
  • 10
11
votes
1 answer

Purge-css is removing all css stylings instead of just the unused ones

I'm trying to use purgecss to remove any unused css, particularly the unused css from Bootstrap. With Purgecss setup, all my css is being removed, and only inline styling remains. This means purgecss is removing the styling for all css classes, not…
Sam
  • 1,765
  • 11
  • 82
  • 176
11
votes
1 answer

mini-css-extract plugin with postcss throws this.getOptions is not a function

I'm trying to set up a tailwind css for my personal project. It's a react SSR application. I'm having an issue with postcss setup under the webpack configuration. It throws the same error on every *.css file (even on the empty ones). It looks like…
11
votes
5 answers

TypeError: Invalid PostCSS Plugin found at: plugins[0]

I cloned this repo https://github.com/tailwindcss/setup-examples/tree/master/examples/nextjs then I updated tailwind.config.js theme: { extend: { color: { primary: "#730000", secondry: "#efefef", }, }, }, …
Prince Sodhi
  • 2,845
  • 2
  • 21
  • 35
11
votes
5 answers

Gulp v4 watch task

I just upgraded to Gulp v4 and was wondering why my gulpfile isn't working anymore. I tried the new code of the new documentation but it didn't worked out as planned because I'm using "pure" postcss. So I googled for my issue and found this…
obeN
  • 416
  • 1
  • 5
  • 16
11
votes
2 answers

Is it possible to have a local class inherit all classes imported from a file?

Say I have a css file that looks something like this: /* Base styles */ .content { background-color: var(--background); color: var(--text); font-family: "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; line-height: 1.5; …
Brandon Durham
  • 7,096
  • 13
  • 64
  • 101
11
votes
3 answers

Webpack postcss loader, what's its purpose?

I am trying to find out, what the postcss-loader is good for. On the github page https://github.com/postcss/postcss-loader it says: Loader for webpack to process CSS with PostCSS I dont't get that: So, PostCSS is a a WP-Loader to process CSS with…
LongHike
  • 4,016
  • 4
  • 37
  • 76
11
votes
2 answers

Generating sourcemaps with npm scripts using node-sass and postcss autoprefixer

Is it possible to generate fully working sourcemaps using node-sass and postcss autoprefixer when piping output from one to another? I currently have the following in package.json: "scripts": { "sass": "node-sass sass/app.scss --source-map true…
baseten
  • 1,362
  • 1
  • 13
  • 34
11
votes
2 answers

How to run POSTCSS AFTER sass-loader and ExtractTextPlugin have finished?

I am trying to figure out how to run postcss on my final output css file. 'strict'; const path = require('path'); const webpack = require('webpack'); const StatsPlugin = require('stats-webpack-plugin'); /* POSTCSS Optimizations of CSS files…
nhavar
  • 198
  • 1
  • 8
10
votes
6 answers

Getting Postcss warning without using it

I'm getting this Postcss warning: You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js. (repeated 19 times) But I'm not using…
Vencho
  • 153
  • 1
  • 2
  • 12
10
votes
1 answer

CssSyntaxError Unknown word building with Webpack 4

Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError (1:4) Unknown word > 1 | // style-loader: Adds some css to the DOM by adding a