mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
- 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>
32 lines
1009 B
Plaintext
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`.
|
|
:::
|