Skip to content

Commit 6d33f56

Browse files
authored
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.
1 parent e40ab27 commit 6d33f56

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
@@ -25,6 +25,9 @@
2525
// we have to change it in order for margins to work.
2626
display: inline-block;
2727

28+
// Avoids issues in some CSS grid layouts (see #25153).
29+
position: relative;
30+
2831
.mdc-checkbox {
2932
// MDC theme styles also include structural styles so we have to include the theme at least
3033
// 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)