Skip to content

Commit

Permalink
fix(material/stepper): add styling to stepper for high contrast mode (#…
Browse files Browse the repository at this point in the history
…23526)

(cherry picked from commit 980f6b2)
  • Loading branch information
amysorto committed Sep 27, 2021
1 parent 6b71169 commit b026b4e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/material/stepper/step-header.scss
@@ -1,5 +1,6 @@
@use '../core/style/layout-common';
@use './stepper-variables';
@use '../../cdk/a11y';

.mat-step-header {
overflow: hidden;
Expand All @@ -8,6 +9,19 @@
position: relative;
box-sizing: content-box;
-webkit-tap-highlight-color: transparent;

@include a11y.high-contrast(active, off) {
outline: solid 1px;
&.cdk-keyboard-focused, &.cdk-program-focused {
outline: solid 3px;
}

&[aria-selected='true'] {
.mat-step-label {
text-decoration: underline;
}
}
}
}

.mat-step-optional,
Expand Down
9 changes: 9 additions & 0 deletions src/material/stepper/stepper.scss
@@ -1,6 +1,7 @@
@use '../core/style/variables';
@use '../core/style/private';
@use './stepper-variables';
@use '../../cdk/a11y';

.mat-stepper-vertical,
.mat-stepper-horizontal {
Expand Down Expand Up @@ -125,11 +126,19 @@
}

.mat-horizontal-content-container {
@include a11y.high-contrast(active, off) {
outline: solid 1px;
}

overflow: hidden;
padding: 0 stepper-variables.$side-gap stepper-variables.$side-gap stepper-variables.$side-gap;
}

.mat-vertical-content-container {
@include a11y.high-contrast(active, off) {
outline: solid 1px;
}

margin-left: stepper-variables.$vertical-stepper-content-margin;
border: 0;
position: relative;
Expand Down

0 comments on commit b026b4e

Please sign in to comment.