This is kinda counterintuitive, the app folder has a global.css but these globals are not applied for the pages folder. How to fix this?
Asked
Active
Viewed 88 times
1 Answers
1
Create pages/_app.js
and import your styles there:
import '../styles.css'
// This default export is required in a new `pages/_app.js` file.
export default function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}
More info - https://nextjs.org/docs/pages/building-your-application/styling/css-modules#global-styles

Gasanov
- 2,839
- 1
- 9
- 21
-
https://nextjs.org/docs/pages/building-your-application/styling/tailwind-css – n79qk272x57w46w9 Jul 04 '23 at 05:33
-
the docs say that the path is @/styles/globals.css , but it can't be resolved – n79qk272x57w46w9 Jul 04 '23 at 05:33