You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cdk/a11y): make cdk-high-contrast work w/ emulated view encapsulation
Say you have this in your component:
```scss
.some-element {
@include cdk-high-contrast() {
border: 1px solid white;
}
}
```
With this change, this will output:
```scss
.cdk-high-contrast-active .some-element,
.cdk-high-contrast-active :host .some-element {
border: 1px solid white;
}
```
Here, `.cdk-high-contrast-active .some-element` will apply in places
where encapsulation is turned off, and `.cdk-high-contrast-active :host
.some-element` will apply in cases where encapsulation is emulated.
Neither will work in Shadow DOM (which we don't officially support).
AFAIK, Shadow DOM would need to use `:host-content()`, which we could
consider adding if we get an additional request.
This adds a few more bytes, but high-contrast styles tend to be pretty
limited.
0 commit comments