From 0a9fb83b1cb888fe8c891bb29d06225eb8db6df5 Mon Sep 17 00:00:00 2001 From: Sendil Kumar N Date: Fri, 3 Jun 2016 00:28:28 +0800 Subject: [PATCH] fix(checkbox): checkbox animation works in Safari (#594) * fix for checkbox opacity issues in safari * readio * Revert "readio" This reverts commit db62acfa8f654f4c8585bfd7f1fcb0dc5f04bb10. * updates based on comment --- src/components/checkbox/checkbox.scss | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/checkbox/checkbox.scss b/src/components/checkbox/checkbox.scss index 4564ab1f176..6c825a685cf 100644 --- a/src/components/checkbox/checkbox.scss +++ b/src/components/checkbox/checkbox.scss @@ -241,7 +241,7 @@ md-checkbox { width: $md-checkbox-size; [dir="rtl"] & { - margin:{ + margin: { left: $md-checkbox-item-spacing; right: auto; } @@ -265,9 +265,7 @@ md-checkbox { .md-checkbox-background { @extend %md-checkbox-outer-box; - align-items: center; - background-color: $md-checkbox-background-color; - opacity: 0; + align-items: center; display: inline-flex; justify-content: center; transition: background-color $md-checkbox-transition-duration @@ -333,15 +331,15 @@ md-checkbox { .md-checkbox-mixedmark { transform: scaleX(1) rotate(-45deg); } - + .md-checkbox-background { - opacity: 1; + background-color: $md-checkbox-background-color; } } .md-checkbox-indeterminate { .md-checkbox-background { - opacity: 1; + background-color: $md-checkbox-background-color; } .md-checkbox-checkmark { @@ -359,6 +357,13 @@ md-checkbox { } } + +.md-checkbox-unchecked { + .md-checkbox-background { + background-color: transparent; + } +} + .md-checkbox-disabled { // NOTE(traviskaufman): While the spec calls for translucent blacks/whites for disabled colors, // this does not work well with elements layered on top of one another. To get around this we