Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert link colors to rgb #37081

Closed
2 tasks done
Sir-Genius opened this issue Sep 4, 2022 · 6 comments · Fixed by #35857
Closed
2 tasks done

Convert link colors to rgb #37081

Sir-Genius opened this issue Sep 4, 2022 · 6 comments · Fixed by #35857
Assignees

Comments

@Sir-Genius
Copy link
Contributor

Prerequisites

Proposal

a {
  color: rgba(var(--bs-link-color), var(--bs-link-opacity));
}

a:hover {
  color: rgba(var(--bs-link-hover-color), var(--bs-link-hover-opacity));
}

Motivation and context

It will help with link styling. Also we will be able to do something like this:

a {
  text-decoration: var(--bs-link-line, underline) var(--bs-link-style, initial) rgba(var(--bs-link-color), var(--bs-link-line-opacity, 1));
  // and for the hover state
}

@each $style in (solid dashed dotted) {
  .link-#{$style},
  .link-#{$style}-hover:hover {
    --bs-link-style: #{$style};
  }
}
@mdo
Copy link
Member

mdo commented Sep 5, 2022

This would be a great candidate for v5.3.0—adding to that for now!

@barrett28

This comment was marked as off-topic.

@Ruchita-01
Copy link

Solution: Converting link colors to RGB
a:link { color: green; background-color: transparent; text-decoration: none; } a:visited { color: blue; background-color: transparent; text-decoration: none; } a:hover { color: red; background-color: transparent; text-decoration: underline; } a:active { color: grey; background-color: transparent; text-decoration: underline; }
Description:
An unclicked link will be green and ununderlined in this instance.
Links that have been visited will be blue and not underlined.
A link that is active will be highlighted in grey.
In addition, a link will turn red and be highlighted when you mouse over it (a:hover).

@Gayatri-Shahane

This comment was marked as off-topic.

@barrett28

This comment was marked as off-topic.

@Jyotiraditya24

This comment was marked as off-topic.

@mdo mdo self-assigned this Oct 6, 2022
@mdo mdo mentioned this issue Oct 14, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants