编程语言/tailwindcss:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
创建页面,内容为“== 标题文本 == [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…”
 
Kangkk​(留言 | 贡献)
第11行: 第11行:
@import 'tailwindcss/theme.css' layer(theme);
@import 'tailwindcss/theme.css' layer(theme);
@import 'tailwindcss/utilities.css' layer(utilities);</syntaxhighlight>
@import 'tailwindcss/utilities.css' layer(utilities);</syntaxhighlight>
== 暗黑模式 ==
暗黑模式使用

2025年7月31日 (四) 15:36的版本

标题文本

检测源文件中的类


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);

暗黑模式

暗黑模式使用