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

Commit 9d9892b

Browse files
chore: Add HCM border mixin to deprecated MDC chips.
PiperOrigin-RevId: 520775721
1 parent 55093ee commit 9d9892b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: packages/mdc-chips/deprecated/_mixins.scss

+15
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
@use '@material/checkbox/variables' as checkbox-variables;
3131
@use '@material/elevation/mixins' as elevation-mixins;
3232
@use '@material/density/functions' as density-functions;
33+
@use '@material/dom';
3334
@use '@material/feature-targeting/feature-targeting';
3435
@use '@material/focus-ring/focus-ring';
3536
@use '@material/ripple/ripple';
@@ -728,6 +729,20 @@ $ripple-target: '.mdc-chip__ripple';
728729
}
729730
}
730731

732+
@mixin high-contrast-border($width: 1px, $query: feature-targeting.all()) {
733+
$feat-structure: feature-targeting.create-target($query, structure);
734+
735+
@include dom.forced-colors-mode {
736+
#{$ripple-target} {
737+
@include feature-targeting.targets($feat-structure) {
738+
top: -$width;
739+
left: -$width;
740+
border: $width solid transparent;
741+
}
742+
}
743+
}
744+
}
745+
731746
@mixin high-contrast-focus {
732747
// High contrast mode focus for chips.
733748
.mdc-chip__focus-ring {

0 commit comments

Comments
 (0)