Skip to content

Commit f5bdefe

Browse files
committed
fix(material/checkbox): broken appearance in some grid layouts (#25197)
Fixes that the checkbox looked broken when placed in some CSS grid layouts. Fixes #25153. (cherry picked from commit 6d33f56)
1 parent d375d4d commit f5bdefe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/material-experimental/mdc-checkbox/checkbox.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
// we have to change it in order for margins to work.
2828
display: inline-block;
2929

30+
// Avoids issues in some CSS grid layouts (see #25153).
31+
position: relative;
32+
3033
.mdc-checkbox {
3134
// MDC theme styles also include structural styles so we have to include the theme at least
3235
// once here. The values will be overwritten by our own theme file afterwards.

src/material/checkbox/checkbox.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ $_mark-stroke-size: math.div(2, 15) * checkbox-common.$size !default;
189189
cursor: pointer;
190190
-webkit-tap-highlight-color: transparent;
191191

192+
// Avoids issues in some CSS grid layouts (see #25153).
193+
position: relative;
194+
192195
.mat-ripple-element:not(.mat-checkbox-persistent-ripple) {
193196
opacity: 0.16;
194197
}

0 commit comments

Comments
 (0)