feat(themes): add semantic control radius tokens#577
Closed
aralston wants to merge 1 commit intoreshaped-ui:mainfrom
Closed
feat(themes): add semantic control radius tokens#577aralston wants to merge 1 commit intoreshaped-ui:mainfrom
aralston wants to merge 1 commit intoreshaped-ui:mainfrom
Conversation
Adds control-small, control-medium, control-large, and control-xlarge radius tokens that allow theme authors to customize border-radius for interactive controls independently from general radius values. Components updated: Button, TextField, TextArea, Select, MenuItem Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
|
Can you tell me more about your use case? In general the principles behind the current theming system is to keep tokens very low level and not be component specific. It definitely makes the component less flexible but also makes themes easier to use for anyone building custom components not having to think what a "control" is |
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.
Summary
control-small,control-medium,control-large, andcontrol-xlargeradius tokensProblem
Currently, components like Button have hardcoded size-to-radius mappings (e.g., small buttons always use
--rs-radius-small). Theme authors cannot customize how "rounded" interactive controls appear without affecting non-control elements that use the same base radius tokens.Solution
Introduce semantic
control-*radius tokens that default to referencing existing radius tokens but can be overridden by theme authors:Test plan
pnpm build)pnpm test:unit)🤖 Generated with Claude Code