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
Forced colors #6
Comments
This is a quick and dirty update of the high contrast mode styles to include forced colors following the idea above (again haven't yet had the chance to test that this actually works): @media (-ms-high-contrast: active), (forced-colors: active) {
code[class*="language-"],
pre[class*="language-"] {
color: WindowText;
color: CanvasText;
background: Window;
background: Canvas;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: Window;
background: Canvas;
}
.token.important {
background: Highlight;
color: Window;
color: Canvas;
font-weight: normal;
}
.token.atrule,
.token.attr-value,
.token.function,
.token.keyword,
.token.operator,
.token.selector {
font-weight: bold;
}
.token.attr-value,
.token.comment,
.token.doctype,
.token.function,
.token.keyword,
.token.operator,
.token.property,
.token.string {
color: Highlight;
}
.token.attr-value,
.token.url {
font-weight: normal;
}
} |
Hey! Sorry for the late reply here, things have been kind of chaotic for me as of late. We're sill in the weird in-between period where I've been waffling on what to do, but I like your suggestion of using the new system color stack, and think that's worth the extra bandwidth hit? Does that sound good to you? If so I can update and see about getting releases updated in places where it's consumed. |
No stress! I appreciate you taking the time. I'll admit it's been a while since I've looked at or thought about this, but I think a few extra lines wouldn't hurt too bad in terms of bandwidth but I'm no expert. |
Just wondering whether the
-ms-high-contrast
media queries should be updated toforced-colors
?Seems like Microsoft is recommending this:
Along with using the new system colors, I assume something like this would work for fallback (though I haven't tested it):
The text was updated successfully, but these errors were encountered: