-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[ui components] Refactor ButtonLink to use CSS module #32814
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
base: box-css
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,38 @@ | ||||||||||||||
| .buttonLink { | ||||||||||||||
| --button-link-color: var(--color-link-default); | ||||||||||||||
| --button-link-hover-color: var(--color-link-default); | ||||||||||||||
| --button-link-active-color: var(--color-link-default); | ||||||||||||||
|
Comment on lines
+2
to
+4
Contributor
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. The default values for hover and active colors should be updated to match the original behavior. Currently, all three CSS variables are set to
Suggested change
Spotted by Graphite Agent |
||||||||||||||
|
|
||||||||||||||
| background: transparent; | ||||||||||||||
| border: 0; | ||||||||||||||
| color: var(--button-link-color); | ||||||||||||||
| cursor: pointer; | ||||||||||||||
| font-size: inherit; | ||||||||||||||
| line-height: 1; | ||||||||||||||
| padding: 8px; | ||||||||||||||
| margin: -8px; | ||||||||||||||
| text-align: left; | ||||||||||||||
| transition: 30ms color linear; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .buttonLink:disabled { | ||||||||||||||
| cursor: default; | ||||||||||||||
| opacity: 0.7; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .buttonLink:hover { | ||||||||||||||
| color: var(--button-link-hover-color); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .buttonLink:active { | ||||||||||||||
| color: var(--button-link-active-color); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .buttonLink:focus:not(:focus-visible) { | ||||||||||||||
| outline: none; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .textDecorationAlways, | ||||||||||||||
| .textDecorationHover:hover:not(:disabled) { | ||||||||||||||
| text-decoration: underline; | ||||||||||||||
| } | ||||||||||||||
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.
The original implementation defaulted to
'hover'whenunderlinewas not provided, but this implementation only applies a class whenunderlineis defined. To maintain the same behavior, consider changing to:This ensures the hover underline effect remains the default behavior, matching the previous implementation.
Spotted by Graphite Agent

Is this helpful? React 👍 or 👎 to let us know.