Skip to content

Commit 770c531

Browse files
committed
sv
1 parent 3970d11 commit 770c531

39 files changed

+1389
-889
lines changed

docs/develop/tailwind-css-migration.md

Lines changed: 509 additions & 0 deletions
Large diffs are not rendered by default.

spx-gui/.vscode/extensions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"recommendations": [
3-
"Vue.volar",
3+
"vue.volar",
44
"dbaeumer.vscode-eslint",
5-
"esbenp.prettier-vscode"
5+
"esbenp.prettier-vscode",
6+
"bradlc.vscode-tailwindcss"
67
]
78
}

spx-gui/AGENTS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,32 @@ When working with backend unique string identifiers such as `username`, project
8080

8181
* Generate accessibility info for interactive elements using `v-radar` directive.
8282

83+
## Styling Preferences
84+
85+
* For business code outside `src/components/ui/`, prefer Tailwind as the default way to implement local layout and surface styling.
86+
* If business code still needs local authored styles, prefer plain CSS over SCSS.
87+
* Do not add or keep business-code imports of SCSS helpers from `src/components/ui/`.
88+
* For `src/components/ui/`, the long-term direction is the same, but this phase still allows local SCSS where it remains the clearest implementation.
89+
* Keep [src/app.css](src/app.css) limited to Tailwind entry setup, the theme bridge, and rare project-wide utilities.
90+
* Do not move page-local or feature-local styles into `src/app.css` just because they are written with Tailwind.
91+
* Keep page-specific dimensions, transforms, colors, and card/banner styling local to the relevant page or component.
92+
* Keep the existing `--ui-*` design token system as the source of truth.
93+
* In Tailwind utility classes, prefer the bridged semantic tokens such as `text-text`, `text-title`, and `bg-primary-100`.
94+
* In local CSS or SCSS rules, prefer using the original `--ui-*` variables directly instead of routing those rules back through Tailwind bridge variables.
95+
* For theme namespaces already covered by the design system, such as color, shadow, font, font-size, radius, and line-height, reset Tailwind's default values in `src/app.css` and expose only the project-specific values intended for use in this repo.
96+
* Keep the project breakpoint mapping in `src/app.css` aligned with `src/components/ui/responsive.ts`.
97+
* Reset Tailwind's default breakpoint names in `src/app.css` and use only the project-specific names `tablet`, `desktop`, and `desktop-large` in responsive classes.
98+
* For responsive styling, prefer Tailwind responsive variants over runtime `useResponsive()` checks.
99+
* Keep `useResponsive()` for non-style logic only, such as changing fetched counts or other runtime behavior that CSS cannot express.
100+
* Prefer Tailwind for straightforward layout and surface styling: flex, grid, spacing, sizing, alignment, overflow, simple typography, and simple hover states.
101+
* When Tailwind classes stay readable, write them directly in the template and remove the local style block after verification.
102+
* Keep local CSS or SCSS for deep selectors, generated content, third-party DOM overrides, and complex stateful widgets.
103+
* Do not force a file to become fully Tailwind if a small amount of local CSS or SCSS remains the clearest expression.
104+
* Use `:style` for one-off values that are clearer inline than as Tailwind arbitrary values or custom utilities.
105+
* For important or non-obvious background assets, prefer TypeScript imports plus inline `backgroundImage` binding over Tailwind `bg-[url(...)]` classes.
106+
* Do not introduce setup variables for single-use style values unless they are reused, computed, or materially improve readability.
107+
* When a non-token visual value needs to remain exact and local, keep it local instead of forcing it into the global token bridge. Add a nearby comment such as `TODO: review this ... value` so it is visible in later design cleanup or tokenization work.
108+
83109
### Menu Item Text Guidelines
84110

85111
When creating or modifying menu items, follow these UI guidelines for ellipses:

0 commit comments

Comments
 (0)