bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Make use of the link decoration CSS variables

Open mrshowerman opened this issue 3 months ago • 1 comments

Prerequisites

Proposal

Is there a reason why links don't use the CSS variables defined for link decoration?

# _reboot.scss, line 244
a {
  color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));
  text-decoration: $link-decoration;

  &:hover {
    --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);
    text-decoration: $link-hover-decoration;
  }
}

CSS variables for link decoration and link hover decoration are defined in _root.scss, but they seem to be used nowhere.

Motivation and context

Using the CSS variables instead of the SCSS variables would make it easier to override link decorations in custom classes, and to reset them with the original state (based on the SCSS variable) if needed.

mrshowerman avatar Sep 15 '25 09:09 mrshowerman

This is already happening in v6. I imagine we could also do v5 though.

mdo avatar Sep 17 '25 20:09 mdo