Skip to content

Commit 0a9fb83

Browse files
sendilkumarnjelbourn
authored andcommitted
fix(checkbox): checkbox animation works in Safari (#594)
* fix for checkbox opacity issues in safari * readio * Revert "readio" This reverts commit db62acf. * updates based on comment
1 parent 2d9f4c4 commit 0a9fb83

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/components/checkbox/checkbox.scss

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ md-checkbox {
241241
width: $md-checkbox-size;
242242

243243
[dir="rtl"] & {
244-
margin:{
244+
margin: {
245245
left: $md-checkbox-item-spacing;
246246
right: auto;
247247
}
@@ -265,9 +265,7 @@ md-checkbox {
265265
.md-checkbox-background {
266266
@extend %md-checkbox-outer-box;
267267

268-
align-items: center;
269-
background-color: $md-checkbox-background-color;
270-
opacity: 0;
268+
align-items: center;
271269
display: inline-flex;
272270
justify-content: center;
273271
transition: background-color $md-checkbox-transition-duration
@@ -333,15 +331,15 @@ md-checkbox {
333331
.md-checkbox-mixedmark {
334332
transform: scaleX(1) rotate(-45deg);
335333
}
336-
334+
337335
.md-checkbox-background {
338-
opacity: 1;
336+
background-color: $md-checkbox-background-color;
339337
}
340338
}
341339

342340
.md-checkbox-indeterminate {
343341
.md-checkbox-background {
344-
opacity: 1;
342+
background-color: $md-checkbox-background-color;
345343
}
346344

347345
.md-checkbox-checkmark {
@@ -359,6 +357,13 @@ md-checkbox {
359357
}
360358
}
361359

360+
361+
.md-checkbox-unchecked {
362+
.md-checkbox-background {
363+
background-color: transparent;
364+
}
365+
}
366+
362367
.md-checkbox-disabled {
363368
// NOTE(traviskaufman): While the spec calls for translucent blacks/whites for disabled colors,
364369
// this does not work well with elements layered on top of one another. To get around this we

0 commit comments

Comments
 (0)