Repository navigation
fix(skills): alias an existing brush when overriding a lightweight styling key (backport #237) - #238
Merged
Conversation
…yling key (#237) * fix(skills): alias an existing brush when overriding a lightweight styling key The uno-themes references only showed a new SolidColorBrush for a lightweight styling override, so agents wrapped theme roles in new brushes and repeated them in Light and Default. Teach the alias, written once, and keep a per-theme SolidColorBrush for colours outside the palette. Add a uno-themes eval case for it. Closes #236 Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(skills): override a lightweight key only to change it - A key set to the brush the theme already gives it does nothing; the skills now say to check the default first. - The alias example was itself a default (ChipBackgroundChecked is PrimaryBrush in Simple); it is now TabBarItemForegroundSelected. - A CardContentControl reads the CardContent keys, not the Card ones; card.md lists the keys Simple reads and their defaults. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit f0efa31) # Conflicts: # evals/uno-themes/simple-danger-and-error/graders/rubric-danger-button.md # evals/uno-themes/simple-danger-and-error/graders/rubric-error-textbox.md
Author
|
Cherry-pick of f0efa31 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
4 tasks done
kazo0
enabled auto-merge (squash)
November 15, 2026 17:41
kazo0
approved these changes
Nov 15, 2026
|
Congrats on your first pull-request! We ❤ the people who are involved in this project, and we’d love to pay it forward by sending you some swag. If you have any feedback (or ideas how to improve Uno as a open-source project) please open a feedback issue. |
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.

GitHub Issue (If applicable): closes #236
PR Type
What is the current behavior?
The skills show only one way to override a lightweight styling key: a new
SolidColorBrush. Agents follow that and write a new brush even when the value is a brush the theme already has, often wrapping a role (Color="{ThemeResource PrimaryColor}") and repeating it inLightandDefault.What is the new behavior?
When the new value is an existing theme brush, the override is an alias written once:
<StaticResource x:Key="FilledButtonBackground" ResourceKey="TertiaryBrush" />. A per-themeSolidColorBrushis only for a colour outside the palette.uno-themes/references/semantic-colors-brushes.md, Part 4: Method 2 states the rule and shows the alias first. It says the alias element is a resource definition and doesn't change the{ThemeResource}rule for properties. The off-palette example now has bothLightandDefault. Method 3 applies the same rule at control scope.uno-themes/references/simple.mdandmaterial-customization.md: the alias one-liner, plus a pointer to Part 4.uno-themes/SKILL.md: one sentence in "Restyle through resource keys, not copied templates".uno-toolkit/references/lightweight-styling.md: a Key Principles line pointing to the rule.evals/uno-themes/lightweight-key-alias: new case, with graders for the alias (either attribute order), noSolidColorBrushwrapping a theme colour, and a judge that each key is defined once.evals/uno-themes/simple-danger-and-error: the two rubrics described aSolidColorBrushoverride as acceptable; they now describe the alias.semantic-colors-brushes.mdMethod 2,uno-themes/SKILL.mdandlightweight-styling.mdnow say to check a key's default first, and to override the keys of the control the page uses. The alias example was itself a no-op (ChipBackgroundCheckedis alreadyPrimaryBrushin Simple); it is nowTabBarItemForegroundSelected→PrimaryBrush.uno-toolkit/references/card.md: a short table of the keys a SimpleCardContentControlreads, with defaults. TheCardkeys (FilledCardBackground,CardForeground) do not reach it.skills/mirror re-synced.PR Checklist
Additional Information
Runtime check (the issue's open note). I tested a throwaway Material app on Uno.Sdk 7.1.0-dev.18,
net10.0-desktop:App.xaml, outsideThemeDictionaries(FilledButtonBackground→TertiaryBrush). The live button matched the active theme'sTertiaryBrushacross Dark → Light → Dark.Button.Resources(SecondaryBrush). Same result.MainPage.xamlupdated the running button. An edit inApp.xamlwas reported as applied but didn't change the button. I didn't compare it with aSolidColorBrushedit there.ResourceDictionary.TryResolveAliasresolves the alias on every lookup under the active theme and doesn't cache it, which matches the desktop result.Not verified: the Windows (WinUI) head. Package registration failed locally. Uno.Themes' own control dictionaries repeat each alias in
LightandDefault. If native WinUI resolves an app-scope alias only once, the wording should switch to one alias per theme dictionary. Please check on Windows before merging.Checks.
Test-Plugin.ps1andTest-EvalCases.ps1pass.simple.mdandcard.mdwere already over the 6,000-character warning; they grow by about 90 and 760 characters. I didn't runInvoke-Evals.ps1.🤖 Generated with Claude Code
This is an automatic backport of pull request #237 done by [Mergify](https://mergify.com).