fix: highlight active news filter button with primary colour#42
Draft
fix: highlight active news filter button with primary colour#42
Conversation
Co-authored-by: supersonictw <13705584+supersonictw@users.noreply.github.com>
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
twinkle-website | d2a91f2 | Commit Preview URL Branch Preview URL |
Feb 23 2026, 02:41 AM |
- Add @theme block to main.css to register --color-primary-* CSS vars (Nuxt UI v4 requires this for color="primary" to resolve correctly) - Update app.config.ts: use 'primary' color name instead of hex value, and rename gray→neutral for Nuxt UI v4 compatibility - Change news.vue active filter from variant solid to outline so the selected button shows a yellow/gold border + text highlight - Add package-lock.json to .gitignore Co-authored-by: supersonictw <13705584+supersonictw@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix navigation bar button highlight on news page
fix: highlight active news filter button with primary colour
Feb 23, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The active filter button on the news page had no visible highlight — the selected item (e.g. 全部) appeared dimmer than inactive buttons rather than standing out.
Root cause: Nuxt UI v4 + Tailwind CSS v4 requires colour scales to be registered via
@themeusing--color-primary-*custom properties. The previous config passed a raw hex toui.colors.primary, which is not a valid colour scale name —color="primary"had nothing to resolve and fell back silently.Changes
main.css— Add@themeblock registering the full--color-primary-{50…950}scale using the existing Twinkle AI brand yellow (#ffd500):app.config.ts— Replaceprimary: '#ffd500'withprimary: 'primary'to reference the registered theme scale; rename legacygraykey toneutral(Nuxt UI v4 field name):news.vue— Switch active filter button fromvariant="solid"tovariant="outline"so the selection is communicated via primary-coloured border + text rather than a filled background, per the issue request for highlighted text:Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.