Closed1
Tailwind CSS v4 での外部プラグインの追加方法
global.css
に @plugin
をつけて指定すると有効化される.
global.css
@import 'tailwindcss';
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}
@plugin '@tailwindcss/typography';
参考
環境
tailwindcss: 4.0.3
このスクラップは2025/02/06にクローズされました