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

Utilities API missing local vars in pseudo states #35966

Closed
3 tasks done
flippidippi opened this issue Mar 7, 2022 · 0 comments · Fixed by #36500
Closed
3 tasks done

Utilities API missing local vars in pseudo states #35966

flippidippi opened this issue Mar 7, 2022 · 0 comments · Fixed by #36500

Comments

@flippidippi
Copy link

flippidippi commented Mar 7, 2022

Prerequisites

Describe the issue

Currently, if you add state: hover to a utility like color, the utility won't quite work correctly because the hover state class does not include the local variable like the non-hover classes. So the --bs-text-opacity variable isn't set.

.text-white-hover:hover {
    color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important;
}

I currently have to following as a temporary fix:

[class*=" text-"][class*="-hover "] {
  --bs-text-opacity: 1
}

[class*=" bg-"][class*="-hover "] {
  --bs-bg-opacity: 1
}

Reduced test cases

<p class="text-white-hover">doesn't hover to white</p>

<p class="text-white text-white-hover">does hover to white</p>

What operating system(s) are you seeing the problem on?

Linux

What browser(s) are you seeing the problem on?

Microsoft Edge

What version of Bootstrap are you using?

5.1.9

@mdo mdo added this to To do in v5.2.0 via automation Apr 12, 2022
@mdo mdo added this to To do in v5.2.0-stable via automation Apr 12, 2022
v5.2.0-stable automation moved this from To do to Done Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v5.2.0
  
To do
v5.2.0-stable
  
Done
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants