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

bootstrap docs: Windows high contrast: navbar has transparent background #40757

Closed
3 tasks done
rr-it opened this issue Aug 21, 2024 · 1 comment · Fixed by #40911
Closed
3 tasks done

bootstrap docs: Windows high contrast: navbar has transparent background #40757

rr-it opened this issue Aug 21, 2024 · 1 comment · Fixed by #40911

Comments

@rr-it
Copy link

rr-it commented Aug 21, 2024

Prerequisites

Describe the issue

In Windows high contrast mode the navbar in bootstrap docs https://getbootstrap.com/docs/5.3/getting-started/introduction/ becomes transparent.

Also see: #35941

Maybe just change

.bd-navbar {
padding: .75rem 0;
background-color: transparent;
box-shadow: 0 .5rem 1rem rgba($black, .15), inset 0 -1px 0 rgba($white, .15);
&::after {
position: absolute;
inset: 0;
z-index: -1;
display: block;
content: "";
background-image: linear-gradient(rgba(var(--bd-violet-rgb), 1), rgba(var(--bd-violet-rgb), .95));
}

.bd-navbar {
  background-color: transparent;

  &::after {
    background-image: linear-gradient(rgba(var(--bd-violet-rgb), 1), rgba(var(--bd-violet-rgb), .95));
  }

to something like

.bd-navbar {
  background-color: rgba(var(--bd-violet-rgb), .00001);

  &::after {
    background-image: linear-gradient(rgba(var(--bd-violet-rgb), 1), rgba(var(--bd-violet-rgb), .95));
  }

or

.bd-navbar {
  background-color: transparent;
  @media (forced-colors) {
    background-color: var(--bd-violet);
  }

  &::after {
    background-image: linear-gradient(rgba(var(--bd-violet-rgb), 1), rgba(var(--bd-violet-rgb), .95));
  }

Reduced test cases

https://codepen.io/rr-it/pen/MWMVXKQ

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

Windows

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

Chrome

What version of Bootstrap are you using?

v5.3

@MohamadSalman11
Copy link
Contributor

MohamadSalman11 commented Oct 5, 2024

Hi @rr-it could you please check if the problem has been resolved?

Here you can check out. The live preview link is included: #40911.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants