Remove link + tint tokens
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -2,7 +2,16 @@
|
||||
'@backstage/ui': minor
|
||||
---
|
||||
|
||||
Added new status foreground tokens and improved Link component styling
|
||||
**BREAKING**: Removed link and tint color tokens, added new status foreground tokens, and improved Link component styling
|
||||
|
||||
**Removed Tokens (BREAKING):**
|
||||
|
||||
The following color tokens have been removed:
|
||||
|
||||
- `--bui-fg-link` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
|
||||
- `--bui-fg-tint` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
|
||||
- `--bui-bg-tint` (and all related tokens: `-hover`, `-pressed`, `-disabled`)
|
||||
- `--bui-border-tint` (and all related tokens)
|
||||
|
||||
**New Status Tokens:**
|
||||
|
||||
@@ -17,6 +26,28 @@ The `-on-bg` variants are designed for text on colored backgrounds, while the ba
|
||||
|
||||
**Migration:**
|
||||
|
||||
For link colors, migrate to one of the following alternatives:
|
||||
|
||||
```diff
|
||||
.custom-link {
|
||||
- color: var(--bui-fg-link);
|
||||
+ color: var(--bui-fg-info); /* For informational links */
|
||||
+ /* or */
|
||||
+ color: var(--bui-fg-primary); /* For standard text links */
|
||||
}
|
||||
```
|
||||
|
||||
For tint colors (backgrounds, foregrounds, borders), migrate to appropriate status or neutral colors:
|
||||
|
||||
```diff
|
||||
.info-section {
|
||||
- background: var(--bui-bg-tint);
|
||||
+ background: var(--bui-bg-info); /* For informational sections */
|
||||
+ /* or */
|
||||
+ background: var(--bui-bg-neutral-on-surface-0); /* For neutral emphasis */
|
||||
}
|
||||
```
|
||||
|
||||
If you're using status foreground colors on colored backgrounds, update to the new `-on-bg` tokens:
|
||||
|
||||
```diff
|
||||
@@ -27,23 +58,4 @@ If you're using status foreground colors on colored backgrounds, update to the n
|
||||
}
|
||||
```
|
||||
|
||||
For standalone status indicators (icons, badges, text), continue using the base tokens which now have updated values for better visibility.
|
||||
|
||||
**Link Component Updates:**
|
||||
|
||||
1. **New `standalone` prop**: Links now have a `standalone` variant that removes the default underline (shows only on hover)
|
||||
2. **New `info` color**: Added support for `color="info"`
|
||||
3. **Improved default underline styling**: Links now show underlines by default with refined styling using `color-mix` for better visual hierarchy
|
||||
|
||||
```tsx
|
||||
// Default link - shows underline by default
|
||||
<Link href="/">Sign up</Link>
|
||||
|
||||
// Standalone link - underline only on hover
|
||||
<Link href="/" standalone>Sign up</Link>
|
||||
|
||||
// Info color link
|
||||
<Link href="/" color="info">Learn more</Link>
|
||||
```
|
||||
|
||||
**Affected components:** Link
|
||||
|
||||
@@ -259,13 +259,9 @@
|
||||
|
||||
--bui-fg-primary: var(--bui-white);
|
||||
--bui-fg-secondary: var(--bui-gray-7);
|
||||
--bui-fg-link: var(--bui-white);
|
||||
--bui-fg-link-hover: var(--bui-white);
|
||||
--bui-fg-disabled: var(--bui-gray-5);
|
||||
--bui-fg-solid: var(--bui-black);
|
||||
--bui-fg-solid-disabled: #072f15;
|
||||
--bui-fg-tint: var(--bui-white);
|
||||
--bui-fg-tint-disabled: var(--bui-gray-5);
|
||||
--bui-fg-danger: #e22b2b;
|
||||
--bui-fg-warning: #e36d05;
|
||||
--bui-fg-success: #1db954;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -81,13 +81,9 @@
|
||||
--bui-bg-info: #dbeafe;
|
||||
--bui-fg-primary: var(--bui-black);
|
||||
--bui-fg-secondary: var(--bui-gray-7);
|
||||
--bui-fg-link: #1f5493;
|
||||
--bui-fg-link-hover: #1f2d5c;
|
||||
--bui-fg-disabled: #9e9e9e;
|
||||
--bui-fg-solid: var(--bui-white);
|
||||
--bui-fg-solid-disabled: #98a8bc;
|
||||
--bui-fg-tint: #1f5493;
|
||||
--bui-fg-tint-disabled: var(--bui-gray-5);
|
||||
--bui-fg-danger-on-bg: #991919;
|
||||
--bui-fg-warning-on-bg: #92310a;
|
||||
--bui-fg-success-on-bg: #116932;
|
||||
@@ -150,13 +146,9 @@
|
||||
--bui-bg-info: #132049;
|
||||
--bui-fg-primary: var(--bui-white);
|
||||
--bui-fg-secondary: var(--bui-gray-7);
|
||||
--bui-fg-link: #9cc9ff;
|
||||
--bui-fg-link-hover: #7eb5f7;
|
||||
--bui-fg-disabled: var(--bui-gray-7);
|
||||
--bui-fg-solid: #101821;
|
||||
--bui-fg-solid-disabled: #6191cc;
|
||||
--bui-fg-tint: #9cc9ff;
|
||||
--bui-fg-tint-disabled: var(--bui-gray-5);
|
||||
--bui-fg-danger-on-bg: #fca5a5;
|
||||
--bui-fg-warning-on-bg: #fdba74;
|
||||
--bui-fg-success-on-bg: #86efac;
|
||||
|
||||
@@ -123,13 +123,9 @@
|
||||
/* Foreground colors */
|
||||
--bui-fg-primary: var(--bui-black);
|
||||
--bui-fg-secondary: var(--bui-gray-7);
|
||||
--bui-fg-link: #1f5493;
|
||||
--bui-fg-link-hover: #1f2d5c;
|
||||
--bui-fg-disabled: #9e9e9e;
|
||||
--bui-fg-solid: var(--bui-white);
|
||||
--bui-fg-solid-disabled: #98a8bc;
|
||||
--bui-fg-tint: #1f5493;
|
||||
--bui-fg-tint-disabled: var(--bui-gray-5);
|
||||
|
||||
/* Foreground Statuses */
|
||||
--bui-fg-danger-on-bg: #991919;
|
||||
@@ -217,13 +213,9 @@
|
||||
/* Foreground colors */
|
||||
--bui-fg-primary: var(--bui-white);
|
||||
--bui-fg-secondary: var(--bui-gray-7);
|
||||
--bui-fg-link: #9cc9ff;
|
||||
--bui-fg-link-hover: #7eb5f7;
|
||||
--bui-fg-disabled: var(--bui-gray-7);
|
||||
--bui-fg-solid: #101821;
|
||||
--bui-fg-solid-disabled: #6191cc;
|
||||
--bui-fg-tint: #9cc9ff;
|
||||
--bui-fg-tint-disabled: var(--bui-gray-5);
|
||||
|
||||
/* Foreground statuses */
|
||||
--bui-fg-danger-on-bg: #fca5a5;
|
||||
|
||||
Reference in New Issue
Block a user