这是indexloc提供的服务,不要输入任何密码
Skip to content

fix(docs): css import order bug in tailwindcss docs and example #10561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/site/content/docs/guides/tools/tailwind.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,15 @@ Create a `build` and `dev` task that runs the scripts for building of components

<Tab value="styles.css">

This file is small! It makes sure that Tailwind CSS runs for the package.
This `styles.css` contains component-level styles for the shared UI library.

<Callout type="info">
Do not import Tailwind CSS here. It should only be imported by the consuming
application to avoid style duplication issues.
</Callout>

```css title="./packages/ui/src/index.css"
@import 'tailwindcss';
/* Component-level styles for the UI package */
```

</Tab>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwind/packages/ui/src/styles.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import "tailwindcss";
/* Component-level styles for the UI package */
Loading