Skip to content

Commit

Permalink
Merge pull request #5700 from pennin-style:use-inert-radio
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 668978675
  • Loading branch information
copybara-github committed Aug 29, 2024
2 parents 22e19c2 + a696121 commit 990d065
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
11 changes: 3 additions & 8 deletions radio/internal/_radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,14 @@ $_md-sys-motion: tokens.md-sys-motion-values();
);
}

// <input> is also the touch target
input {
appearance: none;
.touch-target {
height: 48px;
margin: 0;
position: absolute;
width: 48px;
cursor: inherit;
}

:host([touch-target='none']) input {
width: 100%;
height: 100%;
:host([touch-target='none']) .touch-target {
display: none;
}

md-ripple {
Expand Down
8 changes: 1 addition & 7 deletions radio/internal/radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,7 @@ export class Radio extends radioBaseClass {
<circle class="inner circle" cx="10" cy="10" r="5" />
</svg>
<input
id="input"
type="radio"
tabindex="-1"
.checked=${this.checked}
.value=${this.value}
?disabled=${this.disabled} />
<div class="touch-target"></div>
</div>
`;
}
Expand Down

0 comments on commit 990d065

Please sign in to comment.