Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Update Next.js example to include a use in a component-level CSS module #64

Open
bravokiloecho opened this issue May 13, 2020 · 0 comments

Comments

@bravokiloecho
Copy link

Next.js allows for component-level CSS via CSS modules as documented here.

Can the next.js example be updated to include an example of this?

For example, I tried to use:

.header {
  @apply text-lg;
}

in a CSS module and got the following error:

Syntax error: `@apply` cannot be used with `.rows-span-3` because `.rows-span-3` either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.rows-span-3` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.

Many thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant