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

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第2行: 第2行:


[https://tailwindcss.com/docs/detecting-classes-in-source-files#class-detection-in-depth 检测源文件中的类]
[https://tailwindcss.com/docs/detecting-classes-in-source-files#class-detection-in-depth 检测源文件中的类]
== 主题 ==
[https://tailwindcss.com/docs/theme theme] 默认情况下在当前文件的文本域中,一定要在顶层引用 tailwindcss 之后主题才会生效,在文档中此处被称之为“<code>最终 CSS 输出中将仅生成使用的 CSS 变量</code>”,那么什么是<code>将仅生成使用</code>呢,很有歧义


{{hc|head=assets/module/theme.css|output=<syntaxhighlight lang="bash">
/* 生效 */
@import 'tailwindcss';
@theme {
  --ci-dark-bg: #121212;
}
</syntaxhighlight>}}
{{Leftrightflex|{{hc|head=assets/module/theme.css|output=<syntaxhighlight lang="bash">
/* 不生效 */
@theme {
  --ci-dark-bg: #121212;
}
</syntaxhighlight>}}|{{hc|head=assets/index.css|output=<syntaxhighlight lang="bash">
/* 生效 */
@import 'tailwindcss';
@import './module/theme.css';
</syntaxhighlight>}}}}


== preflight ==
== preflight ==