-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 162c5fd
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Next.js + Tailwind CSS Example | ||
|
||
This example shows how to use [Tailwind CSS](https://tailwindcss.com/) [(v3.0)](https://tailwindcss.com/blog/tailwindcss-v3) with Next.js. It follows the steps outlined in the official [Tailwind docs](https://tailwindcss.com/docs/guides/nextjs). | ||
|
||
## How to use | ||
|
||
Install `yarn` by running `npm i yarn`. | ||
|
||
Run `yarn install` or `npm install` to install all the required dependencies. | ||
|
||
Run `yarn dev` or `npm run dev` to start the development server on [localhost:3000](localhost:3000). | ||
|
||
Run `yarn build` or `npm run build` to build the project, and `yarn start` or `npm run start` to run the project. | ||
|
||
## Notes | ||
|
||
This project uses the combination of [MUI](https://mui.com/) for UI components, [emotion](https://emotion.sh/docs/introduction) as the styled engine for MUI and [TailwindCSS](https://tailwindcss.com/). | ||
|
||
The current configuration allows TailwindCSS to be injected at the bottom of the `<head></head>` tag, overwriting styles from MUI while still maintaining the effect of inline style. | ||
|
||
> This is achieved by adding the class `'#__next'` before TailwindCSS, allowing it to take precedence over MUI. |