Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for checkbox opacity issues in safari #594

Merged
merged 4 commits into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/components/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ md-checkbox {
width: $md-checkbox-size;

[dir="rtl"] & {
margin:{
margin: {
left: $md-checkbox-item-spacing;
right: auto;
}
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -359,6 +357,13 @@ md-checkbox {
}
}


.md-checkbox-unchecked {
.md-checkbox-background {
background-color: none;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe none is a valid value for background-color. Did you meantransparent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah transperant.

}
}

.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
Expand Down
2 changes: 1 addition & 1 deletion src/core/style/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $md-toggle-size: 20px !default;
// TODO(jelbourn): all of these need to be revisited

// The default animation curves used by material design.
$md-linear-out-slow-in-timing-function: cubic-bezier(0.0, 0.0, 0.2, 0.1) !default;
$md-linear-out-slow-in-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1) !default;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to change this in this PR and instead do a review directly with the Material Design UX team.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you guide on how?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean to just revert this line here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay then. Will change this and background thing

$md-fast-out-slow-in-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1) !default;
$md-fast-out-linear-in-timing-function: cubic-bezier(0.4, 0.0, 1, 1) !default;

Expand Down