# weapp-tailwindcss 文档索引 > Tailwind CSS 小程序适配方案,覆盖 uni-app、taro、rax、mpx、原生等场景的官方文档合集。 LLM 导航说明: - 顺序为「入门 → 配置 → API → 迁移/问题 → AI 工作流」,覆盖 webpack/vite/gulp 与各类小程序框架。 - 站点根为 https://tw.icebreaker.top,GitHub Pages 下为 /weapp-tailwindcss/ 前缀。 - 已剔除 MDX import 与重复标题,便于模型解析;附带保留的标题/描述 frontmatter。 ## Table of Contents - [简介](https://tw.icebreaker.top/intro.md): - [css 中使用 @apply 警告问题](https://tw.icebreaker.top/issues/at-apply.md): 我们以 `vscode` 为例 - [默认盒模型(box-sizing)问题](https://tw.icebreaker.top/issues/box-sizing.md): `Tailwindcss` 默认会把所有的元素的盒模型,设置为 `border-box` - [CSS 变量失效问题](https://tw.icebreaker.top/issues/css-vars.md): 在使用 `taro` 或者 `uni-app` 中,可能你会遇到 `CSS` 变量失效问题 - [组件外部样式类(externalClasses)的支持](https://tw.icebreaker.top/issues/externalClasses.md): 自定义组件使用 externalClasses 时 tailwindcss 样式拆分的问题与解决方案。 - [Tailwindcss 格式化](https://tw.icebreaker.top/issues/format.md): > 这是官方提供的包, - [group 和 peer 使用限制](https://tw.icebreaker.top/issues/group-and-peer.md): 在 `tailwindcss` 中,我们常常会这样写: - [常见问题](https://tw.icebreaker.top/issues/index.md): :::info 组件外部样式类必读 - [写在 js 中的 tailwindcss 任意值失效](https://tw.icebreaker.top/issues/js-string-invalid.md): `weapp-tailwindcss` 是允许你在 `js` 中编写任意值的,而且 `weapp-tailwindcss` 会自动帮你做好任意值的转译。 - [在 monorepo 中使用](https://tw.icebreaker.top/issues/monorepo.md): 在 `monorepo` 由于存在 `hoist` 机制,可能会导致 `weapp-tailwindcss` 和 `tailwindcss` 通信受阻,这时候需要显式的去指定 `tailwindcss` 的路径 - [生成样式只作用于view和text标签](https://tw.icebreaker.top/issues/more-tags.md): 在微信小程序中,`darkMode` 设置为 `class`/ `selector` 后,`dark:className` 类选择器在 `button` 上无效,看生成样式只作用于 `view` 和 `text` 标签 - [原生头条小程序使用 TailWindCSS](https://tw.icebreaker.top/issues/native-toutiao.md): > 以下内容由使用 `weapp-tailwindcss` 的热心网友提供,十分感谢! - [rpx 任意值颜色或长度单位二义性与解决方案](https://tw.icebreaker.top/issues/rpx-ambiguities.md): 在不使用 `weapp-tailwindcss` 的情况下,你直接写这样的 `rpx` 写法: - [`Tarojs` 中使用 `terser` 压缩代码](https://tw.icebreaker.top/issues/taro-terser.md): 在 `taro` `webpack5` 环境下,这个插件和外置额外安装的 `terser-webpack-plugin` 一起使用,会导致插件转义功能失效 - [H5 端原生 toast 样式偏移问题](https://tw.icebreaker.top/issues/toast-svg-bug.md): 在使用 `tailwindcss` 的时候,编译到 `h5` 平台,使用 `uni.toast` / `taro.toast` 时,出现下列的效果 - [和 NutUI 一起使用](https://tw.icebreaker.top/issues/use-with-nutui.md): `taro` 使用 [NutUI](https://nutui.jd.com) 的 `vue` 和 `react` 版本的共同注意点: - [和 Taroify 一起使用](https://tw.icebreaker.top/issues/use-with-taroify.md): `taro` 使用 [Taroify](https://taroify.github.io/taroify.com/) 的共同注意点: - [和 wot-design-uni 一起使用](https://tw.icebreaker.top/issues/use-with-wot-design-uni.md): 和 wot-design-uni 一起使用 - [v1 版本插件常见问题,使用最新版本插件无须参考](https://tw.icebreaker.top/issues/v1.md): 详见 [issue#28](https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/28) - [AI 生成小程序代码](https://tw.icebreaker.top/ai/index.md): 本页面为使用 AI 快速构建小程序的专题,希望能够帮助大家不断的提升自己的开发效率 - [LLM 友好文档 (llms.txt)](https://tw.icebreaker.top/ai/llms.md): 1. 在仓库根目录执行 `pnpm --filter @weapp-tailwindcss/website build`(或 `cd website && pnpm build`)。 - [At Property](https://tw.icebreaker.top/at-property.md): 在 CSS 里,`@property` 是一个 **注册自定义属性(CSS Custom Properties)** 的新特性,它解决了原先 `--var: value` 那种“纯字符串变量”的一些缺陷。它主要提供了 **类型约束、初始值、继承控制** 等能力,让浏览器能更高效地处理这些变量,... - [咨询与定制服务](https://tw.icebreaker.top/community/consult.md): 国内像我这种开源,大部分都是为爱发电,除了个别朋友零星的打赏之外就再也没有人赞助了,当然打赏的钱也非常少,总的打赏金额比我一天的工资少多了。 - [加入技术交流群](https://tw.icebreaker.top/community/group.md): 如果你在使用中遇到什么问题,也欢迎你进入交流群进行提问。 - [加载自定义字体](https://tw.icebreaker.top/community/load-font.md): 详见: https://github.com/sonofmagic/weapp-tailwindcss/discussions/637 - [cva 与 tailwind-variants 支持](https://tw.icebreaker.top/community/merge/cva-and-variants.md): 使用 weapp-tailwindcss runtime 系列(@weapp-tailwindcss/cva 与 @weapp-tailwindcss/variants)内置的 cva()、tv() 等工具,快速封装跨端组件。 - [集成与排障指南](https://tw.icebreaker.top/community/merge/integration.md): 在真实项目中集成 @weapp-tailwindcss/merge 的注意事项,以及针对不同打包器的调试技巧。 - [概览](https://tw.icebreaker.top/community/merge/overview.md): @weapp-tailwindcss/merge 的定位、安装方式、快速上手示例以及多端项目的常见用法。 - [运行时 API](https://tw.icebreaker.top/community/merge/runtime-api.md): shared runtime —— @weapp-tailwindcss/runtime 以及 merge 系列在小程序里的用法。 - [适配的 `tailwindcss` 插件](https://tw.icebreaker.top/community/plugins.md): 虽然,相当一部分 `tailwindcss` 插件,都可以直接在 `weapp-tailwindcss` 里使用了。 - [🔥各个框架的模板](https://tw.icebreaker.top/community/templates.md): import TemplateLink from '@site/src/components/TemplateLink' - [@weapp-tailwindcss/typography](https://tw.icebreaker.top/community/typography.md): 小程序 `@tailwindcss/typography` 富文本渲染方案 - [生态以及解决方案](https://tw.icebreaker.top/community.md): - [版权信息](https://tw.icebreaker.top/copyright.md):