refactor(theme): comment out spacing variables for Tailwind CSS v4 compatibility

- Added comments in theme.css and theme.css files to explain the changes in spacing variable definitions.
- Temporarily commented out the `--spacing-5xs` variable due to significant differences with container spacing in Tailwind CSS v4.
- Ensured clarity on the priority of CSS variable resolution in Tailwind CSS.
This commit is contained in:
MyPrototypeWhat 2025-12-02 18:31:12 +08:00
parent df0ca5bb2e
commit 3cd048868a
2 changed files with 12 additions and 4 deletions

View File

@ -321,7 +321,11 @@
/* ==================== */
/* Spacing */
/* ==================== */
--spacing-5xs: 0.25rem;
/* 在 Tailwind CSS v4 中,像 max-w-md、w-md 这类工具类会按照命名空间优先级查找 CSS 变量: */
/* --spacing-{value} > --container-{value} */
/* 下述定义的spacing与container相差巨大,所以先注释掉 */
/* --spacing-5xs: 0.25rem;
--spacing-4xs: 0.5rem;
--spacing-3xs: 0.75rem;
--spacing-2xs: 1rem;
@ -336,7 +340,7 @@
--spacing-5xl: 5.5rem;
--spacing-6xl: 6rem;
--spacing-7xl: 6.5rem;
--spacing-8xl: 7rem;
--spacing-8xl: 7rem; */
/* ==================== */
/* Radius */

View File

@ -318,7 +318,11 @@
/* ==================== */
/* Spacing */
/* ==================== */
--spacing-5xs: 0.25rem;
/* 在 Tailwind CSS v4 中,像 max-w-md、w-md 这类工具类会按照命名空间优先级查找 CSS 变量: */
/* --spacing-{value} > --container-{value} */
/* 下述定义的spacing与container相差巨大,所以先注释掉 */
/* --spacing-5xs: 0.25rem;
--spacing-4xs: 0.5rem;
--spacing-3xs: 0.75rem;
--spacing-2xs: 1rem;
@ -333,7 +337,7 @@
--spacing-5xl: 5.5rem;
--spacing-6xl: 6rem;
--spacing-7xl: 6.5rem;
--spacing-8xl: 7rem;
--spacing-8xl: 7rem; */
/* ==================== */
/* Radius */