Skip to content

Commit f85330a

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 bb3dd5c commit f85330a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
// we have to change it in order for margins to work.
2727
display: inline-block;
2828

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

src/material/checkbox/checkbox.scss

+3
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)