-
Notifications
You must be signed in to change notification settings - Fork 53
Investigate migrating XBuilder frontend styling to Tailwind CSS #2986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
nighca
wants to merge
1
commit into
goplus:dev
Choose a base branch
from
nighca:issue-2981
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| { | ||
| "recommendations": [ | ||
| "Vue.volar", | ||
| "vue.volar", | ||
| "dbaeumer.vscode-eslint", | ||
| "esbenp.prettier-vscode" | ||
| "esbenp.prettier-vscode", | ||
| "bradlc.vscode-tailwindcss" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,6 +80,32 @@ When working with backend unique string identifiers such as `username`, project | |
|
|
||
| * Generate accessibility info for interactive elements using `v-radar` directive. | ||
|
|
||
| ## Styling Preferences | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个应该还需要在迁移过程中补充新的 case,现有的内容也还有精简的空间 |
||
|
|
||
| * For business code outside `src/components/ui/`, prefer Tailwind as the default way to implement local layout and surface styling. | ||
| * If business code still needs local authored styles, prefer plain CSS over SCSS. | ||
| * Do not add or keep business-code imports of SCSS helpers from `src/components/ui/`. | ||
| * For `src/components/ui/`, the long-term direction is the same, but this phase still allows local SCSS where it remains the clearest implementation. | ||
| * Keep [src/app.css](src/app.css) limited to Tailwind entry setup, the theme bridge, and rare project-wide utilities. | ||
| * Do not move page-local or feature-local styles into `src/app.css` just because they are written with Tailwind. | ||
| * Keep page-specific dimensions, transforms, colors, and card/banner styling local to the relevant page or component. | ||
| * Keep the existing `--ui-*` design token system as the source of truth. | ||
| * In Tailwind utility classes, prefer the bridged semantic tokens such as `text-text`, `text-title`, and `bg-primary-100`. | ||
| * In local CSS or SCSS rules, prefer using the original `--ui-*` variables directly instead of routing those rules back through Tailwind bridge variables. | ||
| * 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. | ||
| * Keep the project breakpoint mapping in `src/app.css` aligned with `src/components/ui/responsive.ts`. | ||
| * 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. | ||
| * For responsive styling, prefer Tailwind responsive variants over runtime `useResponsive()` checks. | ||
| * Keep `useResponsive()` for non-style logic only, such as changing fetched counts or other runtime behavior that CSS cannot express. | ||
| * Prefer Tailwind for straightforward layout and surface styling: flex, grid, spacing, sizing, alignment, overflow, simple typography, and simple hover states. | ||
| * When Tailwind classes stay readable, write them directly in the template and remove the local style block after verification. | ||
| * Keep local CSS or SCSS for deep selectors, generated content, third-party DOM overrides, and complex stateful widgets. | ||
| * Do not force a file to become fully Tailwind if a small amount of local CSS or SCSS remains the clearest expression. | ||
| * Use `:style` for one-off values that are clearer inline than as Tailwind arbitrary values or custom utilities. | ||
| * For important or non-obvious background assets, prefer TypeScript imports plus inline `backgroundImage` binding over Tailwind `bg-[url(...)]` classes. | ||
| * Do not introduce setup variables for single-use style values unless they are reused, computed, or materially improve readability. | ||
| * 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. | ||
|
|
||
| ### Menu Item Text Guidelines | ||
|
|
||
| When creating or modifying menu items, follow these UI guidelines for ellipses: | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件迁移完成后可以删掉