-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Modal] Add high contrast border #2114
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
Conversation
|
@dpersing could you tophat this change on Windows with high contrast mode? I don't have Windows setup yet 🙏 |
Let me know if you want help setting this up! |
| box-shadow: shadow(layer); | ||
|
|
||
| @media (-ms-high-contrast: active) { | ||
| border: border(transparent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this line, we'll want to use an actual color instead of transparent. Basically, there are two ways to make a border show up:
- Use a transparent border by default in regular CSS
- Use a colored border in the
@mediaquery
Calling for a transparent border with the @media query actually displays a transparent border! Which seems weird, but there we are.
(Please ignore the highlighted text; that's macOS and VMWare not playing nice together while I tried to take a screenshot.)
In this case, I think we might want to go with the default foreground text color for High Contrast, which would look like something like this:
@media (-ms-high-contrast: active) {
border: 1px solid ms-high-contrast-color('text');
}There are some other examples of that usage in the codebase that might help.
Let me know too if I can help you get set up with test tools!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LauraAubin your hunch was right! @dpersing the reason we went with the media query was to be declarative about why the border is there, so the solution you mentioned above is :chefkiss:
dpersing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweeeeet. Let me know if I can help further, @LauraAubin and @chloerice !
|
@LauraAubin The color is showing up correctly in dev tools now, but it's not displaying because there's no width set! Should just need a I think the closest example is the one that's in the Progress bar, where the border and the color is being set. Let me know if that helps! |
|
Setting up my windows VM so I can actually check these changes haha 😅 |
a7cf7d0 to
e4681e1
Compare
41a35b5 to
23e3814
Compare
fc6acd5 to
0d5ea7d
Compare
It depends on the High Contrast theme you pick! Looks perfect. 🎉 |
dpersing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay for getting your VM set up! This looks great.




WHY are these changes introduced?
Part of #795
Border is missing on high contrast mode in Windows.
WHAT is this pull request doing?
Adds a transparent border to the modal so that in high contrast we can see the modal outline.
Couldn't screenshot since I don't have Windows setup.
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx:🎩 checklist
README.mdwith documentation changes