Files
LCUI/docs/en/devtools/tailwind-css.mdx
CopilotandLiu 437d93d34e docs: add native doc-viewer and widget documentation (#324)
- Add examples/doc-viewer, an LCUI-based documentation viewer with an
  MDX compiler pipeline that converts source MDX files into C/TSX
  page components rendered by lcui build.
- Add zh-CN and en documentation for 5 widgets (anchor, button,
  scrollarea, text, text-input), each with C/TSX/XML example variants
  and widget-fields data.
- Add handbook and overview documentation.

Co-authored-by: Liu <lc-soft@live.cn>
2026-08-05 22:42:19 +08:00

32 lines
1009 B
Plaintext

# Tailwind CSS
Tailwind CSS is a utility-first CSS framework that helps developers quickly apply styles through predefined CSS classes. Compared to traditional CSS, you don't need to create new CSS files, write rules, or think up class names.
## Installation
```sh
npm install -D tailwindcss postcss @thedutchcoder/postcss-rem-to-px
```
## Configuration
Copy the following files from the [lcui-quick-start](https://github.com/lcui-dev/lcui-quick-start) template project to your project root:
- `postcss.config.js`
- `tailwind.config.js`
- `app/global.css`
`global.css` contains the Tailwind directives:
```css title="app/global.css"
@tailwind base;
@tailwind components;
@tailwind utilities;
```
When compiling, `@lcui/cli` processes Tailwind directives through the PostCSS chain (postcss + tailwindcss + postcss-rem-to-px) to generate the final CSS output.
:::tip
If you don't want to place global.css inside the app directory, change the `content` path matching rules in `tailwind.config.js`.
:::