Skip to content

Commit 3efcd7d

Browse files
authored
HCM: fix Link text color (#4799)
* fix Link color in HCM * fix style for overBackground * fix whitespace * use LinkColor for secondary
1 parent 5b31ab2 commit 3efcd7d

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

packages/@adobe/spectrum-css-temp/components/link/skin.css

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
:root {
13+
.spectrum-Link {
1414
--spectrum-link-text-color: var(--spectrum-accent-color-1000);
1515
--spectrum-link-text-color-hover: var(--spectrum-accent-color-1000);
1616
--spectrum-link-text-color-down: var(--spectrum-accent-color-1100);
1717
--spectrum-link-text-color-key-focus: var(--spectrum-accent-color-1000);
18-
}
1918

20-
.spectrum-Link {
2119
color: var(--spectrum-link-text-color);
2220

2321
&:hover {
@@ -37,19 +35,21 @@ governing permissions and limitations under the License.
3735
}
3836
}
3937

40-
.spectrum-Link--secondary{
41-
color: inherit;
42-
43-
&:hover {
38+
@media (forced-colors: none) {
39+
.spectrum-Link--secondary {
4440
color: inherit;
45-
}
4641

47-
&:active {
48-
color: inherit;
49-
}
42+
&:hover {
43+
color: inherit;
44+
}
5045

51-
&:focus {
52-
color: inherit;
46+
&:active {
47+
color: inherit;
48+
}
49+
50+
&:focus {
51+
color: inherit;
52+
}
5353
}
5454
}
5555

@@ -72,3 +72,17 @@ governing permissions and limitations under the License.
7272
color: var(--spectrum-link-over-background-text-color-disabled);
7373
}
7474
}
75+
76+
@media (forced-colors: active) {
77+
.spectrum-Link {
78+
--spectrum-link-text-color: LinkText;
79+
--spectrum-link-text-color-hover: LinkText;
80+
--spectrum-link-text-color-down: LinkText;
81+
--spectrum-link-text-color-key-focus: LinkText;
82+
83+
--spectrum-link-over-background-text-color: LinkText;
84+
--spectrum-link-over-background-text-color-hover: LinkText;
85+
--spectrum-link-over-background-text-color-down: LinkText;
86+
--spectrum-link-over-background-text-color-key-focus: LinkText;
87+
}
88+
}

0 commit comments

Comments
 (0)