Skip to content

Commit 9e85799

Browse files
committed
fix for checkbox opacity issues in safari
1 parent 55cc197 commit 9e85799

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
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: none;
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

src/core/style/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $md-toggle-size: 20px !default;
2424
// TODO(jelbourn): all of these need to be revisited
2525

2626
// The default animation curves used by material design.
27-
$md-linear-out-slow-in-timing-function: cubic-bezier(0.0, 0.0, 0.2, 0.1) !default;
27+
$md-linear-out-slow-in-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1) !default;
2828
$md-fast-out-slow-in-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1) !default;
2929
$md-fast-out-linear-in-timing-function: cubic-bezier(0.4, 0.0, 1, 1) !default;
3030

0 commit comments

Comments
 (0)