Skip to content

Commit

Permalink
fix: material theme transition speed (#142)
Browse files Browse the repository at this point in the history
Was slower then the other toggles, making it feel slugish
  • Loading branch information
knownasilya committed Oct 1, 2020
1 parent ff3b2f7 commit 09c2c00
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions vendor/ember-toggle/themes/material.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
.x-toggle-material.x-toggle-btn {
position: relative;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
}

/* Handle */
.x-toggle-material.x-toggle-btn::after {
border-radius: 2em;
background-color: #fafafa;
box-shadow: 0 3px 2px rgba(0, 0, 0, 0.1);
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.x-toggle:checked + label > .x-toggle-material.x-toggle-btn::after {
Expand All @@ -26,8 +28,8 @@
background-color: #000;
opacity: 0.38;
border-radius: 2em;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.x-toggle:checked + label > .x-toggle-material.x-toggle-btn::before {
Expand All @@ -37,13 +39,17 @@

/* Disabled */
.x-toggle-material.x-toggle-btn.x-toggle-disabled::before,
.x-toggle:checked + label > .x-toggle-material.x-toggle-btn.x-toggle-disabled::before {
.x-toggle:checked
+ label
> .x-toggle-material.x-toggle-btn.x-toggle-disabled::before {
background-color: #000;
opacity: 0.12;
}

.x-toggle-material.x-toggle-btn.x-toggle-disabled::after,
.x-toggle:checked + label > .x-toggle-material.x-toggle-btn.x-toggle-disabled::after {
.x-toggle:checked
+ label
> .x-toggle-material.x-toggle-btn.x-toggle-disabled::after {
background-color: #bdbdbd;
}

Expand Down

0 comments on commit 09c2c00

Please sign in to comment.