编程语言/tailwindcss

来自康健生活
Kangkk​(留言 | 贡献)2025年7月31日 (四) 15:35的版本 (创建页面,内容为“== 标题文本 == [https://tailwindcss.com/docs/detecting-classes-in-source-files#class-detection-in-depth 检测源文件中的类] == preflight == 在构建过程中去掉 <code>layer(base)</code> 以便添加自定义的基础样式。tailwindcss 的 [https://tailwindcss.com/docs/preflight preflight] 基础样式是基于 [https://github.com/sindresorhus/modern-normalize modern-normalize],而我常用的是 [https://github.com/necolas/normalize.css nor…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

标题文本

检测源文件中的类


preflight

在构建过程中去掉 layer(base) 以便添加自定义的基础样式。tailwindcss 的 preflight 基础样式是基于 modern-normalize,而我常用的是 normalize.css,两者之间仍有差别。

@layer theme, base, components, utilities;
@import 'tailwindcss/theme.css' layer(theme);
@import 'tailwindcss/utilities.css' layer(utilities);