Skip to content

Commit

Permalink
fix(chips): add touch target
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 530436458
  • Loading branch information
asyncLiz authored and copybara-github committed May 8, 2023
1 parent 8d31bd9 commit 55c9701
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion chips/lib/_shared.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
padding-inline-end: 8px;
}

.touch {
height: 48px;
inset: 50% 0 0;
position: absolute;
transform: translateY(-50%);
width: 100%;
}

// Outline, separate node for disabled opacity changes
.outline {
border: var(--_outline-width) solid var(--_outline-color);
Expand All @@ -111,7 +119,8 @@
}

.label,
.icon {
.icon,
.touch {
// Place content above background elements
z-index: 1;
}
Expand Down
1 change: 1 addition & 0 deletions chips/lib/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export abstract class Chip extends LitElement {
${this.renderLeadingIcon()}
</span>
<span class="label">${this.label}</span>
<span class="touch"></span>
`;
}

Expand Down

0 comments on commit 55c9701

Please sign in to comment.