Skip to content

Commit c45cd69

Browse files
authored
fix(material/radio): ripple not positioned correctly inside parent with centered text (#22391)
Fixes that the persistent radio button ripple was being offset if it's placed inside an element with `text-align: center`. Fixes #22389.
1 parent a652e17 commit c45cd69

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/material/radio/radio.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ $ripple-radius: 20px;
155155
height: 100%;
156156
transform: none;
157157

158+
// Needs an explicit top/left so it stays aligned no matter how the text is aligned (see #22389).
159+
top: 0;
160+
left: 0;
161+
158162
.mat-radio-container:hover & {
159163
opacity: 0.04;
160164
}

0 commit comments

Comments
 (0)