mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
refactor: 升级tailwindcss至v4版本,带来更快的构建速度、更简化的安装和配置、提供专属vite插件
This commit is contained in:
@@ -1,21 +1,44 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import "tailwindcss";
|
||||
|
||||
@layer components {
|
||||
.flex-c {
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
.flex-ac {
|
||||
@apply flex justify-around items-center;
|
||||
}
|
||||
@theme {
|
||||
--color-bg_color: var(--el-bg-color);
|
||||
--color-primary: var(--el-color-primary);
|
||||
--color-text_color_primary: var(--el-text-color-primary);
|
||||
--color-text_color_regular: var(--el-text-color-regular);
|
||||
}
|
||||
|
||||
.flex-bc {
|
||||
@apply flex justify-between items-center;
|
||||
}
|
||||
/*
|
||||
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.
|
||||
|
||||
.navbar-bg-hover {
|
||||
@apply dark:text-white dark:hover:!bg-[#242424];
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@utility flex-c {
|
||||
@apply flex justify-center items-center;
|
||||
}
|
||||
|
||||
@utility flex-ac {
|
||||
@apply flex justify-around items-center;
|
||||
}
|
||||
|
||||
@utility flex-bc {
|
||||
@apply flex justify-between items-center;
|
||||
}
|
||||
|
||||
@utility navbar-bg-hover {
|
||||
@apply dark:text-white dark:hover:bg-[#242424]!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user