Commit c10fc545 by Brian Talbot Committed by David Baumgold

Studio: abstracts and formalizes set animation/transition Sass variables

parent d046fdf7
...@@ -19,7 +19,7 @@ body, input, button { ...@@ -19,7 +19,7 @@ body, input, button {
} }
a { a {
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
text-decoration: none; text-decoration: none;
color: $blue; color: $blue;
...@@ -642,7 +642,7 @@ hr.divide { ...@@ -642,7 +642,7 @@ hr.divide {
// system notifications // system notifications
.toast-notification { .toast-notification {
@include transition(all 0.2s linear 0); @include transition(all $tmg-f2 linear 0);
display: none; display: none;
position: fixed; position: fixed;
top: 20px; top: 20px;
...@@ -794,7 +794,7 @@ hr.divide { ...@@ -794,7 +794,7 @@ hr.divide {
.tooltip { .tooltip {
@include font-size(12); @include font-size(12);
@include transition(opacity 0.1s ease-out 0); @include transition(opacity $tmg-f3 ease-out 0);
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -867,7 +867,7 @@ body.js { ...@@ -867,7 +867,7 @@ body.js {
background: $white; background: $white;
.action-modal-close { .action-modal-close {
@include transition(top 0.15s ease-in-out 0); @include transition(top $tmg-f3 ease-in-out 0);
@include border-bottom-radius(3px); @include border-bottom-radius(3px);
position: absolute; position: absolute;
top: -3px; top: -3px;
......
...@@ -161,6 +161,17 @@ $shadow-d2: rgba($black, 0.6); ...@@ -161,6 +161,17 @@ $shadow-d2: rgba($black, 0.6);
// ==================== // ====================
// timing - used for animation/transition syncing
$tmg-s3: 3.0s;
$tmg-s2: 2.0s;
$tmg-s1: 1.0s;
$tmg-avg: 0.75s;
$tmg-f1: 0.50s;
$tmg-f2: 0.25s;
$tmg-f3: 0.125s;
// ====================
// specific UI // specific UI
$notification-height: ($baseline*10); $notification-height: ($baseline*10);
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-fadeIn { .anim-fadeIn {
@include animation(fadeIn 0.25s linear 1); @include animation(fadeIn $tmg-f2 linear 1);
} }
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-fadeOut { .anim-fadeOut {
@include animation(fadeOut 0.25s linear 1); @include animation(fadeOut $tmg-f2 linear 1);
} }
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-rotateUp { .anim-rotateUp {
@include animation(rotateUp 0.25s ease-in-out 1); @include animation(rotateUp $tmg-f2 ease-in-out 1);
} }
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-rotateDown { .anim-rotateDown {
@include animation(rotateDown 0.25s ease-in-out 1); @include animation(rotateDown $tmg-f2 ease-in-out 1);
} }
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-rotateCW { .anim-rotateCW {
@include animation(rotateCW 1.0s linear infinite); @include animation(rotateCW $tmg-s1 linear infinite);
} }
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-rotateCCW { .anim-rotateCCW {
@include animation(rotateCCW 1.0s linear infinite); @include animation(rotateCCW $tmg-s1 linear infinite);
} }
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-bounceIn { .anim-bounceIn {
@include animation(bounceIn 0.5s ease-in-out 1); @include animation(bounceIn $tmg-f1 ease-in-out 1);
} }
...@@ -209,5 +209,5 @@ ...@@ -209,5 +209,5 @@
// canned animation - use if you want out of the box/non-customized anim // canned animation - use if you want out of the box/non-customized anim
.anim-bounceOut { .anim-bounceOut {
@include animation(bounceOut 0.5s ease-in-out 1); @include animation(bounceOut $tmg-f1 ease-in-out 1);
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
background: transparent; background: transparent;
[class^="icon-"] { [class^="icon-"] {
@include transition(top 0.25s ease-in-out 0.25s); @include transition(top $tmg-f2 ease-in-out 0.25s);
@include font-size(15); @include font-size(15);
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
.title { .title {
@extend .t-action2; @extend .t-action2;
@extend .btn-dd-nav-primary; @extend .btn-dd-nav-primary;
@include transition(all 0.25s ease-in-out 0); @include transition(all $tmg-f2 ease-in-out 0);
.label, .icon-caret-down { .label, .icon-caret-down {
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
// entire link // entire link
.course-link { .course-link {
@include transition(color 0.25s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
display: block; display: block;
color: $gray-d1; color: $gray-d1;
......
...@@ -33,7 +33,7 @@ nav { ...@@ -33,7 +33,7 @@ nav {
} }
.ui-toggle-dd { .ui-toggle-dd {
@include transition(all 0.25s ease-in-out 0); @include transition(all $tmg-f2 ease-in-out 0);
margin-left: ($baseline/10); margin-left: ($baseline/10);
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
...@@ -58,7 +58,7 @@ nav { ...@@ -58,7 +58,7 @@ nav {
} }
.wrapper-nav-sub { .wrapper-nav-sub {
@include transition (opacity 0.25s ease-in-out 0s); @include transition(opacity $tmg-f2 ease-in-out 0s);
position: absolute; position: absolute;
top: ($baseline*2.5); top: ($baseline*2.5);
opacity: 0.0; opacity: 0.0;
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
// prompts // prompts
.wrapper-prompt { .wrapper-prompt {
@extend .depth5; @extend .depth5;
@include transition(all 0.05s ease-in-out 0); @include transition(all $tmg-f3 ease-in-out 0);
position: fixed; position: fixed;
top: 0; top: 0;
background: $black-t0; background: $black-t0;
...@@ -437,7 +437,7 @@ ...@@ -437,7 +437,7 @@
&.saving { &.saving {
[class^="icon"] { [class^="icon"] {
@include animation(rotateCW 3.0s linear infinite); @include animation(rotateCW $tmg-s3 linear infinite);
width: 25px; width: 25px;
margin: -4px 10px 0 0; margin: -4px 10px 0 0;
@include transform-origin(52% 60%); @include transform-origin(52% 60%);
...@@ -644,7 +644,7 @@ ...@@ -644,7 +644,7 @@
pointer-events: auto; pointer-events: auto;
.prompt { .prompt {
@include animation(bounceIn 0.5s ease-in-out 1); @include animation(bounceIn $tmg-f1 ease-in-out 1);
} }
} }
} }
...@@ -660,7 +660,7 @@ ...@@ -660,7 +660,7 @@
.wrapper-prompt { .wrapper-prompt {
.prompt { .prompt {
@include animation(bounceOut 0.5s ease-in-out 1); @include animation(bounceOut $tmg-f1 ease-in-out 1);
} }
} }
} }
...@@ -680,12 +680,12 @@ ...@@ -680,12 +680,12 @@
// varying animations // varying animations
&.is-shown { &.is-shown {
@include animation(notificationSlideUp 1.0s ease-in-out 1); @include animation(notificationSlideUp $tmg-s1 ease-in-out 1);
@include animation-fill-mode(forwards); @include animation-fill-mode(forwards);
} }
&.is-hiding { &.is-hiding {
@include animation(notificationSlideDown 1.0s ease-in-out 1); @include animation(notificationSlideDown $tmg-s1 ease-in-out 1);
@include animation-fill-mode(forwards); @include animation-fill-mode(forwards);
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.copy { .copy {
@extend .t-copy-sub1; @extend .t-copy-sub1;
@include transition(opacity 0.25s ease-in-out 0); @include transition(opacity $tmg-f2 ease-in-out 0);
opacity: 0.75; opacity: 0.75;
} }
......
...@@ -70,7 +70,7 @@ body.signup, body.signin { ...@@ -70,7 +70,7 @@ body.signup, body.signin {
.action-primary { .action-primary {
@include blue-button; @include blue-button;
@extend .t-action2; @extend .t-action2;
@include transition(all 0.15s linear 0); @include transition(all $tmg-f3 linear 0);
display: block; display: block;
width: 100%; width: 100%;
padding: ($baseline*0.75) ($baseline/2); padding: ($baseline*0.75) ($baseline/2);
...@@ -109,7 +109,7 @@ body.signup, body.signin { ...@@ -109,7 +109,7 @@ body.signup, body.signin {
label { label {
@extend .t-copy-sub1; @extend .t-copy-sub1;
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f3 ease-in-out 0);
margin: 0 0 ($baseline/4) 0; margin: 0 0 ($baseline/4) 0;
&.is-focused { &.is-focused {
...@@ -172,7 +172,7 @@ body.signup, body.signin { ...@@ -172,7 +172,7 @@ body.signup, body.signin {
.tip { .tip {
@extend .t-copy-sub2; @extend .t-copy-sub2;
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f3 ease-in-out 0);
display: block; display: block;
margin-top: ($baseline/4); margin-top: ($baseline/4);
color: $gray-l3; color: $gray-l3;
......
...@@ -31,7 +31,7 @@ body.course.checklists { ...@@ -31,7 +31,7 @@ body.course.checklists {
background: $gray-l4; background: $gray-l4;
.viz-checklist-status-value { .viz-checklist-status-value {
@include transition(width 2.0s ease-in-out .25s); @include transition(width $tmg-s2 ease-in-out .25s);
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -55,13 +55,13 @@ body.course.checklists { ...@@ -55,13 +55,13 @@ body.course.checklists {
padding: $baseline ($baseline*1.5); padding: $baseline ($baseline*1.5);
.checklist-title { .checklist-title {
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
width: flex-grid(6, 9); width: flex-grid(6, 9);
margin: 0 flex-gutter() 0 0; margin: 0 flex-gutter() 0 0;
float: left; float: left;
.ui-toggle-expansion { .ui-toggle-expansion {
@include transition(all 0.15s ease-in-out 0); @include transition(all $tmg-f2 ease-in-out 0);
@include font-size(21); @include font-size(21);
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
...@@ -118,7 +118,7 @@ body.course.checklists { ...@@ -118,7 +118,7 @@ body.course.checklists {
// checklist actions // checklist actions
.course-checklist-actions { .course-checklist-actions {
@include clearfix(); @include clearfix();
@include transition(border 0.15s ease-in-out .25s); @include transition(border $tmg-f2 ease-in-out .25s);
box-shadow: inset 0 1px 1px $shadow-l1; box-shadow: inset 0 1px 1px $shadow-l1;
border-top: 1px solid $gray-l2; border-top: 1px solid $gray-l2;
padding: $baseline ($baseline*1.5); padding: $baseline ($baseline*1.5);
...@@ -208,8 +208,7 @@ body.course.checklists { ...@@ -208,8 +208,7 @@ body.course.checklists {
overflow: hidden; overflow: hidden;
.task { .task {
@include transition(background 0.15s ease-in-out 0); @include transition(background $tmg-f2 ease-in-out 0, border $tmg-f3 ease-in-out 0);
@include transition(border 0.15s ease-in-out 0);
@include clearfix(); @include clearfix();
position: relative; position: relative;
border-top: 1px solid $white; border-top: 1px solid $white;
...@@ -239,7 +238,7 @@ body.course.checklists { ...@@ -239,7 +238,7 @@ body.course.checklists {
font-weight: 500; font-weight: 500;
.task-name { .task-name {
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
vertical-align: baseline; vertical-align: baseline;
cursor: pointer; cursor: pointer;
margin-bottom: 0; margin-bottom: 0;
...@@ -247,20 +246,20 @@ body.course.checklists { ...@@ -247,20 +246,20 @@ body.course.checklists {
.task-description { .task-description {
@extend .t-copy-sub1; @extend .t-copy-sub1;
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
color: $gray-l2; color: $gray-l2;
} }
.task-support { .task-support {
@extend .t-copy-sub2; @extend .t-copy-sub2;
@include transition(opacity 0.15s ease-in-out 0); @include transition(opacity $tmg-f2 ease-in-out 0);
opacity: 0.0; opacity: 0.0;
pointer-events: none; pointer-events: none;
} }
} }
.task-actions { .task-actions {
@include transition(opacity 0.15s ease-in-out 0.25s); @include transition(opacity $tmg-f2 ease-in-out 0.25s);
@include clearfix(); @include clearfix();
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
......
...@@ -151,7 +151,7 @@ body.index { ...@@ -151,7 +151,7 @@ body.index {
background: $white; background: $white;
.action-zoom { .action-zoom {
@include transition(bottom 0.25s ease-in-out 0); @include transition(bottom $tmg-f2 ease-in-out 0);
position: absolute; position: absolute;
bottom: -30px; bottom: -30px;
right: ($baseline/2); right: ($baseline/2);
...@@ -214,7 +214,7 @@ body.index { ...@@ -214,7 +214,7 @@ body.index {
.proofpoint { .proofpoint {
@include box-sizing(border-box); @include box-sizing(border-box);
@include transition(all 0.25s ease-in-out 0); @include transition(all $tmg-f2 ease-in-out 0);
border-radius: ($baseline/4); border-radius: ($baseline/4);
position: relative; position: relative;
top: 0; top: 0;
......
...@@ -64,7 +64,7 @@ body.course.outline { ...@@ -64,7 +64,7 @@ body.course.outline {
.menu { .menu {
@include font-size(12); @include font-size(12);
@include transition(opacity 0.15s linear 0); @include transition(opacity $tmg-f2 linear 0);
border-radius: 4px; border-radius: 4px;
box-shadow: 0 1px 2px rgba(0, 0, 0, .2); box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
z-index: 1; z-index: 1;
...@@ -246,7 +246,7 @@ body.course.outline { ...@@ -246,7 +246,7 @@ body.course.outline {
} }
.section-name-span { .section-name-span {
@include transition(color 0.15s linear 0); @include transition(color $tmg-f2 linear 0);
cursor: pointer; cursor: pointer;
&:hover { &:hover {
...@@ -342,7 +342,7 @@ body.course.outline { ...@@ -342,7 +342,7 @@ body.course.outline {
.menu { .menu {
@include font-size(12); @include font-size(12);
@include transition(opacity 0.15s linear 0, display 0.15s linear 0); @include transition(opacity $tmg-f2 linear 0, display $tmg-f2 linear 0);
border-radius: 4px; border-radius: 4px;
box-shadow: 0 1px 2px rgba(0, 0, 0, .2); box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
z-index: 1; z-index: 1;
...@@ -452,7 +452,7 @@ body.course.outline { ...@@ -452,7 +452,7 @@ body.course.outline {
} }
.section-name-span { .section-name-span {
@include transition(color 0.15s linear 0); @include transition(color $tmg-f2 linear 0);
cursor: pointer; cursor: pointer;
&:hover { &:hover {
......
...@@ -98,7 +98,7 @@ body.course.settings { ...@@ -98,7 +98,7 @@ body.course.settings {
.tip { .tip {
@extend .t-copy-sub2; @extend .t-copy-sub2;
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
display: block; display: block;
margin-top: ($baseline/4); margin-top: ($baseline/4);
color: $gray-l3; color: $gray-l3;
...@@ -155,7 +155,7 @@ body.course.settings { ...@@ -155,7 +155,7 @@ body.course.settings {
label { label {
@extend .t-copy-sub1; @extend .t-copy-sub1;
@include transition(color 0.15s ease-in-out 0); @include transition(color $tmg-f2 ease-in-out 0);
margin: 0 0 ($baseline/4) 0; margin: 0 0 ($baseline/4) 0;
font-weight: 400; font-weight: 400;
...@@ -713,7 +713,7 @@ body.course.settings { ...@@ -713,7 +713,7 @@ body.course.settings {
} }
.tip { .tip {
@include transition(opacity 0.5s ease-in-out 0s); @include transition(opacity $tmg-f1 ease-in-out 0s);
opacity: 0.0; opacity: 0.0;
position: absolute; position: absolute;
bottom: ($baseline*1.25); bottom: ($baseline*1.25);
......
...@@ -137,7 +137,7 @@ body.course.static-pages { ...@@ -137,7 +137,7 @@ body.course.static-pages {
} }
.xmodule_display { .xmodule_display {
@include transition(background-color 3.0s linear 0); @include transition(background-color $tmg-s3 linear 0);
padding: 20px 20px 22px; padding: 20px 20px 22px;
font-size: 24px; font-size: 24px;
font-weight: 300; font-weight: 300;
......
...@@ -335,7 +335,7 @@ body.course.subsection { ...@@ -335,7 +335,7 @@ body.course.subsection {
} }
.menu { .menu {
@include transition(opacity 0.15s linear 0); @include transition(opacity $tmg-f2 linear 0);
z-index: 1; z-index: 1;
position: absolute; position: absolute;
top: -12px; top: -12px;
......
...@@ -256,7 +256,7 @@ body.course.unit { ...@@ -256,7 +256,7 @@ body.course.unit {
color: #3c3c3c; color: #3c3c3c;
&:hover { &:hover {
@include transition(background-color 0.15s linear 0); @include transition(background-color $tmg-f2 linear 0);
background: tint($green,30%); background: tint($green,30%);
color: #fff; color: #fff;
} }
...@@ -291,7 +291,7 @@ body.course.unit { ...@@ -291,7 +291,7 @@ body.course.unit {
float: left; float: left;
[class^="icon-"] { [class^="icon-"] {
@include transition(opacity 0.15s linear 0); @include transition(opacity $tmg-f2 linear 0);
display: inline-block; display: inline-block;
top: 1px; top: 1px;
margin-right: 5px; margin-right: 5px;
...@@ -303,7 +303,7 @@ body.course.unit { ...@@ -303,7 +303,7 @@ body.course.unit {
} }
.editor-indicator { .editor-indicator {
@include transition(opacity 0.15s linear 0); @include transition(opacity $tmg-f2 linear 0);
float: right; float: right;
position: relative; position: relative;
top: 3px; top: 3px;
...@@ -507,7 +507,7 @@ body.course.unit { ...@@ -507,7 +507,7 @@ body.course.unit {
@include blue-button; @include blue-button;
&.is-set { &.is-set {
@include transition(box-shadow 0.5s ease-in-out 0); @include transition(box-shadow $tmg-f1 ease-in-out 0);
@include linear-gradient($blue, $blue); @include linear-gradient($blue, $blue);
color: $blue-d1; color: $blue-d1;
box-shadow: inset 0 1px 2px 1px $shadow-l1; box-shadow: inset 0 1px 2px 1px $shadow-l1;
...@@ -587,7 +587,7 @@ body.course.unit { ...@@ -587,7 +587,7 @@ body.course.unit {
} }
&:hover { &:hover {
@include transition(opacity 0.25s ease-in-out); @include transition(opacity $tmg-f2 ease-in-out);
opacity: 1.0; opacity: 1.0;
} }
...@@ -612,7 +612,7 @@ body.course.unit { ...@@ -612,7 +612,7 @@ body.course.unit {
label.setting-label { label.setting-label {
@extend .t-copy-sub1; @extend .t-copy-sub1;
@include transition(color, 0.15s, ease-in-out); @include transition(color $tmg-f2 ease-in-out 0s);
font-weight: 400; font-weight: 400;
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
...@@ -673,7 +673,7 @@ body.course.unit { ...@@ -673,7 +673,7 @@ body.course.unit {
&:focus { &:focus {
box-shadow: 0 0 1px $shadow; box-shadow: 0 0 1px $shadow;
@include transition(opacity 0.25s ease-in-out); @include transition(opacity $tmg-f2 ease-in-out 0);
background-color: $yellow; background-color: $yellow;
} }
...@@ -698,7 +698,7 @@ body.course.unit { ...@@ -698,7 +698,7 @@ body.course.unit {
&:hover { &:hover {
box-shadow: 0 1px 1px $shadow; box-shadow: 0 1px 1px $shadow;
@include transition(opacity 0.15s ease-in-out); @include transition(opacity $tmg-f2 ease-in-out 0);
background-color: $blue-s3; background-color: $blue-s3;
border: 1px solid $blue-s3; border: 1px solid $blue-s3;
color: $white; color: $white;
...@@ -956,7 +956,7 @@ body.unit { ...@@ -956,7 +956,7 @@ body.unit {
&:hover { &:hover {
@include transition(opacity 0.25s ease-in-out); @include transition(opacity $tmg-f2 ease-in-out 0);
opacity: 1.0s; opacity: 1.0s;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment