Skip to content

Commit 6e26fba

Browse files
committed
fixup! Inherit link color in components using the Feedback color collection (#492)
1 parent 92c0881 commit 6e26fba

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/styles/tools/_collections.scss

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999

100100
// Mixin to generate CSS custom properties for links theme.
101101
//
102-
// 1. Links theming is only available for feedback colors.
102+
// 1. Use light color for links in the dark variant.
103+
// 2. Links theming is not available for the light color from the Neutral color collection.
103104
//
104105
// @param {String} $prefix - The prefix for the CSS custom properties.
105106
// @param {String} $variant-value - The value of the variant.
@@ -119,13 +120,13 @@
119120

120121
@mixin generate-link-properties($prefix, $variant-value) {
121122
$color-category: _get-category-by-value($value: $variant-value, $collections: collections.$colors);
123+
$resolved-variant-value: if($variant-value == "dark", "light", $variant-value); // 1.
122124

123-
// 1.
124-
// TODO: Figure out what to do with the `dark` color category where blue links do not work.
125-
@if $color-category == "feedback" {
126-
--#{$prefix}local-link-color: var(--rui-color-#{$color-category}-#{$variant-value});
127-
--#{$prefix}local-link-color-hover: var(--rui-color-#{$color-category}-#{$variant-value}-hover);
128-
--#{$prefix}local-link-color-active: var(--rui-color-#{$color-category}-#{$variant-value}-active);
125+
// 2.
126+
@if $variant-value != "light" {
127+
--#{$prefix}local-link-color: var(--rui-color-#{$color-category}-#{$resolved-variant-value});
128+
--#{$prefix}local-link-color-hover: var(--rui-color-#{$color-category}-#{$resolved-variant-value}-hover);
129+
--#{$prefix}local-link-color-active: var(--rui-color-#{$color-category}-#{$resolved-variant-value}-active);
129130
}
130131
}
131132

0 commit comments

Comments
 (0)