Skip to content

Commit

Permalink
fix(chips): avatar input chips are rounded by default
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 557300679
  • Loading branch information
asyncLiz authored and copybara-github committed Aug 16, 2023
1 parent bbb7840 commit b7671fb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions chips/internal/_input-chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,28 @@
);
}

:host([avatar]) {
// Use a rounded border by default for avatar chips. Recreating the
// fallbacks allows `--md-input-chip-container-shape` to cascade and
// override this without needing to add more specificity for avatar chips.
--_container-shape-start-start: var(
--md-input-chip-container-shape-start-start,
var(--md-input-chip-container-shape, calc(var(--_container-height) / 2))
);
--_container-shape-start-end: var(
--md-input-chip-container-shape-start-end,
var(--md-input-chip-container-shape, calc(var(--_container-height) / 2))
);
--_container-shape-end-end: var(
--md-input-chip-container-shape-end-end,
var(--md-input-chip-container-shape, calc(var(--_container-height) / 2))
);
--_container-shape-end-start: var(
--md-input-chip-container-shape-end-start,
var(--md-input-chip-container-shape, calc(var(--_container-height) / 2))
);
}

.avatar .primary.action {
padding-inline-start: 4px;
}
Expand Down

0 comments on commit b7671fb

Please sign in to comment.