Skip to content

::before, ::after" is not pure (pure selectors must contain at least one local class or id)  #6717

Closed
@DanielSoCra

Description

What version of Tailwind CSS are you using?

3.0.7

What build tool (or framework if it abstracts the build tool) are you using?

"next": "12.0.7",
"postcss": "^8.4.5",
"@nrwl/next": "13.4.1",
"autoprefixer": "^10.4.0",

What version of Node.js are you using?

v16.13.1

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/DanielSoCra/test-nx

Describe your issue

I am setting up a monorepo with nx to have a component library shared accross a website built with NextJs and a traditional CSR React.js App.

So far, the React App is working fine with the shared library.
The Nextjs app however throws the following error:

Failed to compile
../../libs/shared-ui/src/lib/shared-ui.module.css
CssSyntaxError

([object Object]:[object Object]) Selector "*,
::before,
::after" is not pure (pure selectors must contain at least one local class or id) 

The shared-ui.module.css only has the following content:

@tailwind base;
@tailwind components;
@tailwind utilities;

Please refer to the provided Link and repo for all detailed configurations of tailwind.
I already searched and tried a few things, but nothing worked.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions