Skip to content

Commit

Permalink
Add easings SCSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
meduzen committed Jan 2, 2020
1 parent 5db2508 commit 9a0e748
Show file tree
Hide file tree
Showing 26 changed files with 178 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/easings.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import 'functions/bezier';
@import 'easings/easings';
3 changes: 3 additions & 0 deletions src/easings/_in-back.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-back-value: .6, -.28, .735, .045;
$in-back: bezier('in-back', $in-back-value);
$ease-in-back: bezier('in-back', $in-back-value);
3 changes: 3 additions & 0 deletions src/easings/_in-circ.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-circ-value: .6, .04, .98, .335;
$in-circ: bezier('in-circ', $in-circ-value);
$ease-in-circ: bezier('in-circ', $in-circ-value);
3 changes: 3 additions & 0 deletions src/easings/_in-cubic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-cubic-value: .55, .055, .675, .19;
$in-cubic: bezier('in-cubic', $in-cubic-value);
$ease-in-cubic: bezier('in-cubic', $in-cubic-value);
3 changes: 3 additions & 0 deletions src/easings/_in-expo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-expo-value: .95, .05, .795, .035;
$in-expo: bezier('in-expo', $in-expo-value);
$ease-in-expo: bezier('in-expo', $in-expo-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-back.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-back-value: .68, -.55, .265, 1.55;
$in-out-back: bezier('in-out-back', $in-out-back-value);
$ease-in-out-back: bezier('in-out-back', $in-out-back-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-circ.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-circ-value: .785, .135, .15, .86;
$in-out-circ: bezier('in-out-circ', $in-out-circ-value);
$ease-in-out-circ: bezier('in-out-circ', $in-out-circ-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-cubic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-cubic-value: .645, .045, .355, 1;
$in-out-cubic: bezier('in-out-cubic', $in-out-cubic-value);
$ease-in-out-cubic: bezier('in-out-cubic', $in-out-cubic-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-expo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-expo-value: 1, 0, 0, 1;
$in-out-expo: bezier('in-out-expo', $in-out-expo-value);
$ease-in-out-expo: bezier('in-out-expo', $in-out-expo-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-quad.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-quad-value: .455, .03, .515, .955;
$in-out-quad: bezier('in-out-quad', $in-out-quad-value);
$ease-in-out-quad: bezier('in-out-quad', $in-out-quad-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-quart.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-quart-value: .77, 0, .175, 1;
$in-out-quart: bezier('in-out-quart', $in-out-quart-value);
$ease-in-out-quart: bezier('in-out-quart', $in-out-quart-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-quint.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-quint-value: .86, 0, .07, 1;
$in-out-quint: bezier('in-out-quint', $in-out-quint-value);
$ease-in-out-quint: bezier('in-out-quint', $in-out-quint-value);
3 changes: 3 additions & 0 deletions src/easings/_in-out-sine.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-out-sine-value: .445, .05, .55, .95;
$in-out-sine: bezier('in-out-sine', $in-out-sine-value);
$ease-in-out-sine: bezier('in-out-sine', $in-out-sine-value);
3 changes: 3 additions & 0 deletions src/easings/_in-quad.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-quad-value: .55, .085, .68, .53;
$in-quad: bezier('in-quad', $in-quad-value);
$ease-in-quad: bezier('in-quad', $in-quad-value);
3 changes: 3 additions & 0 deletions src/easings/_in-quart.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-quart-value: .895, .03, .685, .22;
$in-quart: bezier('in-quart', $in-quart-value);
$ease-in-quart: bezier('in-quart', $in-quart-value);
3 changes: 3 additions & 0 deletions src/easings/_in-quint.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-quint-value: .755, .05, .855, .06;
$in-quint: bezier('in-quint', $in-quint-value);
$ease-in-quint: bezier('in-quint', $in-quint-value);
3 changes: 3 additions & 0 deletions src/easings/_in-sine.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$in-sine-value: .47, 0, .745, .715;
$in-sine: bezier('in-sine', $in-sine-value);
$ease-in-sine: bezier('in-sine', $in-sine-value);
3 changes: 3 additions & 0 deletions src/easings/_out-back.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-back-value: .175, .885, .32, 1.275;
$out-back: bezier('out-back', $out-back-value);
$ease-out-back: bezier('out-back', $out-back-value);
3 changes: 3 additions & 0 deletions src/easings/_out-circ.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-circ-value: .075, .82, .165, 1;
$out-circ: bezier('out-circ', $out-circ-value);
$ease-out-circ: bezier('out-circ', $out-circ-value);
3 changes: 3 additions & 0 deletions src/easings/_out-cubic.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-cubic-value: .215, .61, .355, 1;
$out-cubic: bezier('out-cubic', $out-cubic-value);
$ease-out-cubic: bezier('out-cubic', $out-cubic-value);
3 changes: 3 additions & 0 deletions src/easings/_out-expo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-expo-value: .19, 1, .22, 1;
$out-expo: bezier('out-expo', $out-expo-value);
$ease-out-expo: bezier('out-expo', $out-expo-value);
3 changes: 3 additions & 0 deletions src/easings/_out-quad.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-quad-value: .25, .46, .45, .94;
$out-quad: bezier('out-quad', $out-quad-value);
$ease-out-quad: bezier('out-quad', $out-quad-value);
3 changes: 3 additions & 0 deletions src/easings/_out-quart.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-quart-value: .165, .84, .44, 1;
$out-quart: bezier('out-quart', $out-quart-value);
$ease-out-quart: bezier('out-quart', $out-quart-value);
3 changes: 3 additions & 0 deletions src/easings/_out-quint.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-quint-value: .23, 1, .32, 1;
$out-quint: bezier('out-quint', $out-quint-value);
$ease-out-quint: bezier('out-quint', $out-quint-value);
3 changes: 3 additions & 0 deletions src/easings/_out-sine.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$out-sine-value: .39, .575, .565, 1;
$out-sine: bezier('out-sine', $out-sine-value);
$ease-out-sine: bezier('out-sine', $out-sine-value);
105 changes: 105 additions & 0 deletions src/easings/easings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
@import 'in-sine';
@import 'out-sine';
@import 'in-out-sine';

@import 'in-quad';
@import 'out-quad';
@import 'in-out-quad';

@import 'in-cubic';
@import 'out-cubic';
@import 'in-out-cubic';

@import 'in-quart';
@import 'out-quart';
@import 'in-out-quart';

@import 'in-quint';
@import 'out-quint';
@import 'in-out-quint';

@import 'in-expo';
@import 'out-expo';
@import 'in-out-expo';

@import 'in-circ';
@import 'out-circ';
@import 'in-out-circ';

@import 'in-back';
@import 'out-back';
@import 'in-out-back';

/**
* The value associated to each easing
*/
$easings-map: (
'in-sine': $in-sine-value,
'out-sine': $out-sine-value,
'in-out-sine': $in-out-sine-value,

'in-quad': $in-quad-value,
'out-quad': $out-quad-value,
'in-out-quad': $in-out-quad-value,

'in-cubic': $in-cubic-value,
'out-cubic': $out-cubic-value,
'in-out-cubic': $in-out-cubic-value,

'in-quart': $in-quart-value,
'out-quart': $out-quart-value,
'in-out-quart': $in-out-quart-value,

'in-quint': $in-quint-value,
'out-quint': $out-quint-value,
'in-out-quint': $in-out-quint-value,

'in-expo': $in-expo-value,
'out-expo': $out-expo-value,
'in-out-expo': $in-out-expo-value,

'in-circ': $in-circ-value,
'out-circ': $out-circ-value,
'in-out-circ': $in-out-circ-value,

'in-back': $in-back-value,
'out-back': $out-back-value,
'in-out-back': $in-out-back-value,
);

/**
* Available easings
*/
$easings-list: (
'in-sine',
'out-sine',
'in-out-sine',

'in-quad',
'out-quad',
'in-out-quad',

'in-cubic',
'out-cubic',
'in-out-cubic',

'in-quart',
'out-quart',
'in-out-quart',

'in-quint',
'out-quint',
'in-out-quint',

'in-expo',
'out-expo',
'in-out-expo',

'in-circ',
'out-circ',
'in-out-circ',

'in-back',
'out-back',
'in-out-back',
);

0 comments on commit 9a0e748

Please sign in to comment.