Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit d293ed5

Browse files
committed
Using mixins for animation based on @redmunds' feedback.
1 parent 2c451f0 commit d293ed5

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/styles/brackets.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ textarea.exclusions-editor {
12821282
border-radius: 0 0 4px 4px;
12831283
box-shadow: @tc-normal-shadow-bottom;
12841284
opacity: 0;
1285-
-webkit-animation: autocomplete 90ms cubic-bezier(.01, .91, 0, .99) 0 1;
1285+
.animation (autocomplete, 90ms, cubic-bezier(.01, .91, 0, .99), 0, 1);
12861286
-webkit-animation-fill-mode: forwards;
12871287
-webkit-transform-origin: 0 0;
12881288

src/styles/brackets_mixins.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,7 @@
141141
user-select: @type;
142142
}
143143

144+
.animation (@name, @duration: 300ms, @ease: ease, @delay: 0, @iteration-count: 1) {
145+
-webkit-animation: @name @duration @ease @delay @iteration-count;
146+
animation: @name @duration @ease @delay @iteration-count;
147+
}

src/styles/brackets_patterns_override.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ a:focus {
231231

232232
// Dropdown Menu Animation
233233
.dropdown-menu {
234-
-webkit-animation: dropdown 90ms cubic-bezier(0, .97, .2, .99) 1;
234+
.animation(dropdown, 90ms, cubic-bezier(0, .97, .2, .99), 0, 1);
235235
-webkit-transform-origin: 0 0;
236236
}
237237

@@ -526,7 +526,7 @@ a:focus {
526526
position: relative;
527527
top: 0;
528528
margin: auto;
529-
-webkit-animation: modal 240ms cubic-bezier(0, 1.05, .35, 1) 1;
529+
.animation(modal, 240ms, cubic-bezier(0, 1.05, .35, 1), 0, 1);
530530
}
531531

532532
.modal .close {
@@ -611,7 +611,7 @@ a:focus {
611611
}
612612
.last-backdrop {
613613
/* Only show the last modal backdrop */
614-
-webkit-animation: backdrop 200ms linear 1;
614+
.animation (backdrop, 200ms, linear, 0, 1);
615615
opacity: 0.4;
616616
}
617617

0 commit comments

Comments
 (0)