Skip to content

Make use of the link decoration CSS variables #41737

@mrshowerman

Description

@mrshowerman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions