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(cdk/overlay): not setting correct opacity in high contrast mode on Firefox #21896

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions CODING_STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ specific error being caught and why it cannot be prevented.
* Except for `@Input` properties, use `is` and `has` prefixes for boolean properties / methods.

##### Observables
* Don't suffix observables with `$`.
* Don't suffix observables with `$`.

##### Classes
Classes should be named based on what they're responsible for. Names should capture what the code
Expand Down Expand Up @@ -333,7 +333,7 @@ The latter is equivalent for the component, but makes it easier override when ne
#### Support styles for Windows high-contrast mode
This is a low-effort task that makes a big difference for low-vision users. Example:
```css
@media screen and (-ms-high-contrast: active) {
@include cdk-high-contrast(active, off) {
.unicorn-motocycle {
border: 1px solid #fff !important;
}
Expand Down
5 changes: 4 additions & 1 deletion src/cdk/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ sass_library(
sass_binary(
name = "overlay_prebuilt_scss",
src = "overlay-prebuilt.scss",
deps = [":overlay_scss_lib"],
deps = [
":overlay_scss_lib",
"//src/cdk/a11y:a11y_scss_lib",
],
)

ng_test_library(
Expand Down
4 changes: 3 additions & 1 deletion src/cdk/overlay/_overlay.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../a11y/a11y';

// We want overlays to always appear over user content, so set a baseline
// very high z-index for the overlay container, which is where we create the new
// stacking context for all overlays.
Expand Down Expand Up @@ -84,7 +86,7 @@ $backdrop-animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;
// to making it opaque using `opacity`. Note that we can't use the `cdk-high-contrast`
// mixin, because we can't normalize the import path to the _a11y.scss both for the
// source and when this file is distributed. See #10908.
@media screen and (-ms-high-contrast: active) {
@include cdk-high-contrast(active, off) {
opacity: 0.6;
}
}
Expand Down