编程语言/tailwindcss:修订间差异
来自康健生活
| 第14行: | 第14行: | ||
== 暗黑模式 == | == 暗黑模式 == | ||
[https://tailwindcss.com/docs/dark-mode 暗黑模式]如果只是页面中元素的样式改变,直接参阅 tailwindcss 文档就可以。但如果关联了第三方应用(eq: codemirror)就需要借助一些持久化函数 | [https://tailwindcss.com/docs/dark-mode 暗黑模式]如果只是页面中元素的样式改变,直接参阅 tailwindcss 文档就可以。但如果关联了第三方应用(eq: codemirror)就需要借助一些持久化函数 | ||
<syntaxhighlight lang="css"> | |||
@custom-variant dark (&:where(.dark, .dark *)); | |||
/* @custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *)); */ | |||
</syntaxhighlight> | |||