-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Hello Astro UXDS Team,
First off, thank you for creating and maintaining this design system! We are actively using it in our projects and find it very valuable.
While working on theming the components to match our brand, we noticed an opportunity for improvement. Some components, such as the Push Button, seem to be using lower-level system or reference tokens (e.g., color-palette-green-500) directly in their styling, instead of their designated component-specific tokens (e.g., push-button-color-background-selected-default).
This makes it challenging to customize the look and feel of individual components by overriding their specific tokens.
Push Button
A clear example of this can be found in the Push Button component. According to the specification, its styles should be defined by push-button-* tokens, but the implementation sometimes uses more generic system or palette tokens.
To Reproduce
- Specification of Push Button
- Comparison of just a few tokens of spec and Implementation:
| CSS | Spec/Expected | Implementation | Hex |
|---|---|---|---|
| color | push-button-color-text-unselected-default | color-text-interactive-default | #4dacff |
| background | push-button-color-background-unselected-default | not used (maybe wrong spec) | #00000000 |
| border color | push-button-color-border-unselected-default | push-button-color-border-unselected-default | #4dacff |
| selected | |||
| Background | push-button-color-background-selected-default | color-palette-green-500 | #56f000 |
| Border Color | push-button-color-border-selected-default | color-palette-green-500 | #56f000 |
| ... |
As you can see, the hex values are correct but the component tokens are not used and therefore it's hard to apply our own styling.
Is this somehow intentional?
To help align the component with the specification and to highlight my findings, I've started a draft pull request. This PR replaces the system tokens with the appropriate component tokens within the Push Button's styling.
Environment (please complete the following information):
- Browser: Chrome
- @astrouxds/astro-web-components version: 7.27.0
- Framework, if applicable: Svelte