Skip to content

Can't use theme() function together with postcss-each plugin #7362

Answered by adamwathan
vikingmute asked this question in Help
Discussion options

You must be logged in to vote

Hey! Make sure Tailwind is running after postcss-each, otherwise Tailwind is receiving $(var) instead of slate for example.

Controlling plugin order is harder in PostCSS 8 but postcss-each has an API specifically for this:

https://github.com/madyankin/postcss-each/#aftereach

require('postcss-each')({
  plugins: {
    afterEach: [
      require('tailwindcss')
    ],
  }
})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vikingmute
Comment options

@vikingmute
Comment options

Answer selected by vikingmute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #7361 on February 08, 2022 11:06.