Skip to content

Commit

Permalink
fix(chips): misaligned trailing action ripple
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 538841541
  • Loading branch information
asyncLiz authored and copybara-github committed Jun 8, 2023
1 parent 938bf38 commit 9c0336a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions chips/lib/_trailing-icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

@mixin styles() {
.trailing.action {
display: flex;
align-items: center;
justify-content: center;
padding: 0 8px;

// Note: the trailing action's shape only follows the trailing end of the
Expand All @@ -29,8 +30,6 @@
.trailing.action md-ripple {
border-radius: 50%;
height: calc(4 / 3 * var(--_icon-size)); // 24px default
inset: 50% 0 0 50%;
transform: translateX(-50%) translateY(-50%);
width: calc(4 / 3 * var(--_icon-size)); // 24px default
}

Expand Down
2 changes: 1 addition & 1 deletion chips/lib/filter-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {property, query} from 'lit/decorators.js';
import {ARIAMixinStrict} from '../../internal/aria/aria.js';

import {MultiActionChip} from './multi-action-chip.js';
import {renderRemoveButton} from './trailing-actions.js';
import {renderRemoveButton} from './trailing-icons.js';

/**
* A filter chip component.
Expand Down
2 changes: 1 addition & 1 deletion chips/lib/input-chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {property, query} from 'lit/decorators.js';
import {ARIAMixinStrict} from '../../internal/aria/aria.js';

import {MultiActionChip} from './multi-action-chip.js';
import {renderRemoveButton} from './trailing-actions.js';
import {renderRemoveButton} from './trailing-icons.js';

/**
* An input chip component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {Chip} from './chip.js';
export function renderRemoveButton({disabled}: {disabled: boolean}) {
return html`
<button class="trailing action"
?disabled=${disabled ?? false}
?disabled=${disabled}
@click=${handleRemoveClick}
>
<md-focus-ring></md-focus-ring>
Expand Down

0 comments on commit 9c0336a

Please sign in to comment.