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

chore: Add HCM border mixin to deprecated MDC chips. #8063

Closed
wants to merge 1 commit into from
Closed
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
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