Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2505 from matrix-org/travis/settings/animated-tog…
Browse files Browse the repository at this point in the history
…gles

Add simple animations to toggle switches
  • Loading branch information
turt2live authored Jan 25, 2019
2 parents 7a2cc3a + 9bbbab9 commit 949343d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions res/css/views/elements/_ToggleSwitch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// TODO: Fancy transitions

.mx_ToggleSwitch {
transition: background-color 0.20s ease-out 0.1s;
width: 48px;
height: 24px;
border-radius: 14px;
Expand All @@ -33,6 +32,7 @@ limitations under the License.
}

.mx_ToggleSwitch_ball {
transition: left 0.15s ease-out 0.1s;
margin: 2px;
width: 20px;
height: 20px;
Expand All @@ -47,5 +47,5 @@ limitations under the License.
}

.mx_ToggleSwitch_on > .mx_ToggleSwitch_ball {
right: 2px;
left: 23px; // 48px switch - 20px ball - 5px padding = 23px
}

0 comments on commit 949343d

Please sign in to comment.