Update colored links, add new .link-body-emphasis helper#37833
Conversation
…k-color-rgb value because nav links and more do not set --bs-link-color-rgb
There was a problem hiding this comment.
LGTM! Haven't looked at it much in details but indeed it is better for example in navs which doesn't use --bs-link-color-rgb.
Possible enhancement: add .link-body-emphasis in https://deploy-preview-37833--twbs-bootstrap.netlify.app/docs/5.3/utilities/link/#colored-links otherwise it won't be referenced in the docs.
Edit: Oh it's done in https://github.com/twbs/bootstrap/pull/37834/files#diff-897e5f4433f313784070b1963ac521def1ac00d138a94729178d9e0802a610ef + https://github.com/twbs/bootstrap/pull/37834/files#diff-2d2d89da69679363bf082c03f51f5c3f04b2382a1b49db813458c2b7235c14a1. Maybe gather these modifications in this PR for having separate independent commits for history if it's not too complicated.
|
Yeah I forgot to bring over the docs for this. Will do that and then merge. Thanks! |
Rewrites colored links again to use the
colorproperty instead of--bs-link-color-rgbvalue as nav links and more do not set or consume--bs-link-color-rgb. This could be an interesting change to tackle in v6, where components utilize more global CSS variable defaults, but not happening right now. This prevents a breaking change right now.Also adds a new
.link-body-emphasishelper—custom right now, not part of the loop, because we use the loop to turn static hex values intorgbvalues. With this new class, we don't want to use hex values, so we have to write something custom. Worth noting this could also be a change we make in v6—update$theme-colorsto use CSS variables. Maybe, who knows.