You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A colleague of mine was trying to style a headline, which is also a link, to use the regular text color. He did something like the following but with no effect:
h3a { color: var(--pico-color}; }
After some digging we realized that Pico (v2) is reassigning the Pico color custom property for links:
a, [role=link] {
--pico-color:var(--pico-primary);
color:var(--pico-color);
}
We couldn't think of why this wouldn't have simply been:
a, [role=link] {
color:var(--pico-primary);
}
It seems like this would have achieved the same visual default without preventing customization. So before we go off overriding it, I thought I'd ask and get a better understanding of the strategy. So why would --pico-color get reassigned?
Note: I attempted to simplify above code samples to focus on the issue at hand. And also, this question isn't about the wisdom of using the regular text color for a link. 😄
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A colleague of mine was trying to style a headline, which is also a link, to use the regular text color. He did something like the following but with no effect:
After some digging we realized that Pico (v2) is reassigning the Pico color custom property for links:
We couldn't think of why this wouldn't have simply been:
It seems like this would have achieved the same visual default without preventing customization. So before we go off overriding it, I thought I'd ask and get a better understanding of the strategy. So why would
--pico-color
get reassigned?Note: I attempted to simplify above code samples to focus on the issue at hand. And also, this question isn't about the wisdom of using the regular text color for a link. 😄
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions