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

fix transparent navbar in windows high contrast mode #40911

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions site/assets/scss/_navbar.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.bd-navbar {
padding: .75rem 0;
background-color: transparent;
forced-color-adjust: none;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting forced-color-adjust: none might not go well with "user choices to be respected".

See https://developer.mozilla.org/en-US/docs/Web/CSS/forced-color-adjust#usage_notes

This property should only be used to makes changes that will support a user's color and contrast requirements. For example, if you become aware that the color optimizations made by the user agent result in a poor experience when in a high contrast or dark mode. Using this property would enable tweaking of the result in that mode to provide a better experience. It should not be used to prevent user choices being respected.

Copy link
Contributor

@coliff coliff Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I think the PR should have this:

@media (forced-colors) {
    background-color: Canvas;
}

(I did a lot of research and testing on this for: https://github.com/coliff/bootstrap-forced-colors-css#readme)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @coliff , @rr-it . Thanks for the suggestion! I’ve made the changes. Thank you!

box-shadow: 0 .5rem 1rem rgba($black, .15), inset 0 -1px 0 rgba($white, .15);

&::after {
Expand Down