Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
chore: Add HCM border mixin to deprecated MDC chips.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 520775721
  • Loading branch information
material-web-copybara authored and copybara-github committed Mar 31, 2023
1 parent 55093ee commit 121a8ee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/mdc-chips/deprecated/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@use '@material/checkbox/variables' as checkbox-variables;
@use '@material/elevation/mixins' as elevation-mixins;
@use '@material/density/functions' as density-functions;
@use '@material/dom';
@use '@material/feature-targeting/feature-targeting';
@use '@material/focus-ring/focus-ring';
@use '@material/ripple/ripple';
Expand Down Expand Up @@ -728,6 +729,20 @@ $ripple-target: '.mdc-chip__ripple';
}
}

@mixin high-contrast-border($width: 1px, $query: feature-targeting.all()) {
$feat-structure: feature-targeting.create-target($query, structure);

@include dom.forced-colors-mode {
#{$ripple-target} {
@include feature-targeting.targets($feat-structure) {
top: -$width;
left: -$width;
border: $width solid transparent;
}
}
}
}

@mixin high-contrast-focus {
// High contrast mode focus for chips.
.mdc-chip__focus-ring {
Expand Down

0 comments on commit 121a8ee

Please sign in to comment.