bedrock_sass 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/_normalize.scss +3 -0
  3. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  4. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  5. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  6. data/assets/_vendor/foundation/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  7. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  8. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  9. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  10. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  11. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  12. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  13. data/assets/_vendor/foundation/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  14. data/assets/_vendor/foundation/scss/_global.scss +249 -0
  15. data/assets/_vendor/foundation/scss/components/_accordion-menu.scss +171 -0
  16. data/assets/_vendor/foundation/scss/components/_accordion.scss +155 -0
  17. data/assets/_vendor/foundation/scss/components/_badge.scss +63 -0
  18. data/assets/_vendor/foundation/scss/components/_breadcrumbs.scss +117 -0
  19. data/assets/_vendor/foundation/scss/components/_button-group.scss +253 -0
  20. data/assets/_vendor/foundation/scss/components/_button.scss +385 -0
  21. data/assets/_vendor/foundation/scss/components/_callout.scss +106 -0
  22. data/assets/_vendor/foundation/scss/components/_card.scss +129 -0
  23. data/assets/_vendor/foundation/scss/components/_close-button.scss +102 -0
  24. data/assets/_vendor/foundation/scss/components/_drilldown.scss +142 -0
  25. data/assets/_vendor/foundation/scss/components/_dropdown-menu.scss +274 -0
  26. data/assets/_vendor/foundation/scss/components/_dropdown.scss +79 -0
  27. data/assets/_vendor/foundation/scss/components/_flex-video.scss +1 -0
  28. data/assets/_vendor/foundation/scss/components/_flex.scss +117 -0
  29. data/assets/_vendor/foundation/scss/components/_float.scss +27 -0
  30. data/assets/_vendor/foundation/scss/components/_label.scss +64 -0
  31. data/assets/_vendor/foundation/scss/components/_media-object.scss +114 -0
  32. data/assets/_vendor/foundation/scss/components/_menu-icon.scss +9 -0
  33. data/assets/_vendor/foundation/scss/components/_menu.scss +495 -0
  34. data/assets/_vendor/foundation/scss/components/_off-canvas.scss +506 -0
  35. data/assets/_vendor/foundation/scss/components/_orbit.scss +196 -0
  36. data/assets/_vendor/foundation/scss/components/_pagination.scss +193 -0
  37. data/assets/_vendor/foundation/scss/components/_progress-bar.scss +64 -0
  38. data/assets/_vendor/foundation/scss/components/_responsive-embed.scss +70 -0
  39. data/assets/_vendor/foundation/scss/components/_reveal.scss +180 -0
  40. data/assets/_vendor/foundation/scss/components/_slider.scss +137 -0
  41. data/assets/_vendor/foundation/scss/components/_sticky.scss +39 -0
  42. data/assets/_vendor/foundation/scss/components/_switch.scss +247 -0
  43. data/assets/_vendor/foundation/scss/components/_table.scss +330 -0
  44. data/assets/_vendor/foundation/scss/components/_tabs.scss +196 -0
  45. data/assets/_vendor/foundation/scss/components/_thumbnail.scss +67 -0
  46. data/assets/_vendor/foundation/scss/components/_title-bar.scss +84 -0
  47. data/assets/_vendor/foundation/scss/components/_tooltip.scss +160 -0
  48. data/assets/_vendor/foundation/scss/components/_top-bar.scss +175 -0
  49. data/assets/_vendor/foundation/scss/components/_visibility.scss +132 -0
  50. data/assets/_vendor/foundation/scss/forms/_checkbox.scss +41 -0
  51. data/assets/_vendor/foundation/scss/forms/_error.scss +88 -0
  52. data/assets/_vendor/foundation/scss/forms/_fieldset.scss +53 -0
  53. data/assets/_vendor/foundation/scss/forms/_forms.scss +34 -0
  54. data/assets/_vendor/foundation/scss/forms/_help-text.scss +30 -0
  55. data/assets/_vendor/foundation/scss/forms/_input-group.scss +142 -0
  56. data/assets/_vendor/foundation/scss/forms/_label.scss +50 -0
  57. data/assets/_vendor/foundation/scss/forms/_meter.scss +116 -0
  58. data/assets/_vendor/foundation/scss/forms/_progress.scss +94 -0
  59. data/assets/_vendor/foundation/scss/forms/_range.scss +149 -0
  60. data/assets/_vendor/foundation/scss/forms/_select.scss +86 -0
  61. data/assets/_vendor/foundation/scss/forms/_text.scss +179 -0
  62. data/assets/_vendor/foundation/scss/foundation.scss +133 -0
  63. data/assets/_vendor/foundation/scss/grid/_classes.scss +176 -0
  64. data/assets/_vendor/foundation/scss/grid/_column.scss +112 -0
  65. data/assets/_vendor/foundation/scss/grid/_flex-grid.scss +259 -0
  66. data/assets/_vendor/foundation/scss/grid/_grid.scss +48 -0
  67. data/assets/_vendor/foundation/scss/grid/_gutter.scss +82 -0
  68. data/assets/_vendor/foundation/scss/grid/_layout.scss +76 -0
  69. data/assets/_vendor/foundation/scss/grid/_position.scss +76 -0
  70. data/assets/_vendor/foundation/scss/grid/_row.scss +99 -0
  71. data/assets/_vendor/foundation/scss/grid/_size.scss +24 -0
  72. data/assets/_vendor/foundation/scss/prototype/_arrow.scss +36 -0
  73. data/assets/_vendor/foundation/scss/prototype/_border-box.scss +35 -0
  74. data/assets/_vendor/foundation/scss/prototype/_border-none.scss +35 -0
  75. data/assets/_vendor/foundation/scss/prototype/_bordered.scss +54 -0
  76. data/assets/_vendor/foundation/scss/prototype/_box.scss +23 -0
  77. data/assets/_vendor/foundation/scss/prototype/_display.scss +50 -0
  78. data/assets/_vendor/foundation/scss/prototype/_font-styling.scss +95 -0
  79. data/assets/_vendor/foundation/scss/prototype/_list-style-type.scss +95 -0
  80. data/assets/_vendor/foundation/scss/prototype/_overflow.scss +72 -0
  81. data/assets/_vendor/foundation/scss/prototype/_position.scss +114 -0
  82. data/assets/_vendor/foundation/scss/prototype/_prototype.scss +87 -0
  83. data/assets/_vendor/foundation/scss/prototype/_relation.scss +157 -0
  84. data/assets/_vendor/foundation/scss/prototype/_rotate.scss +31 -0
  85. data/assets/_vendor/foundation/scss/prototype/_rounded.scss +54 -0
  86. data/assets/_vendor/foundation/scss/prototype/_separator.scss +96 -0
  87. data/assets/_vendor/foundation/scss/prototype/_shadow.scss +43 -0
  88. data/assets/_vendor/foundation/scss/prototype/_sizing.scss +73 -0
  89. data/assets/_vendor/foundation/scss/prototype/_spacing.scss +204 -0
  90. data/assets/_vendor/foundation/scss/prototype/_text-decoration.scss +48 -0
  91. data/assets/_vendor/foundation/scss/prototype/_text-transformation.scss +48 -0
  92. data/assets/_vendor/foundation/scss/prototype/_text-utilities.scss +88 -0
  93. data/assets/_vendor/foundation/scss/settings/_settings.scss +869 -0
  94. data/assets/_vendor/foundation/scss/typography/_alignment.scss +22 -0
  95. data/assets/_vendor/foundation/scss/typography/_base.scss +509 -0
  96. data/assets/_vendor/foundation/scss/typography/_helpers.scss +80 -0
  97. data/assets/_vendor/foundation/scss/typography/_print.scss +86 -0
  98. data/assets/_vendor/foundation/scss/typography/_typography.scss +26 -0
  99. data/assets/_vendor/foundation/scss/util/_breakpoint.scss +348 -0
  100. data/assets/_vendor/foundation/scss/util/_color.scss +129 -0
  101. data/assets/_vendor/foundation/scss/util/_direction.scss +31 -0
  102. data/assets/_vendor/foundation/scss/util/_flex.scss +85 -0
  103. data/assets/_vendor/foundation/scss/util/_math.scss +72 -0
  104. data/assets/_vendor/foundation/scss/util/_mixins.scss +313 -0
  105. data/assets/_vendor/foundation/scss/util/_selector.scss +41 -0
  106. data/assets/_vendor/foundation/scss/util/_typography.scss +26 -0
  107. data/assets/_vendor/foundation/scss/util/_unit.scss +152 -0
  108. data/assets/_vendor/foundation/scss/util/_util.scss +14 -0
  109. data/assets/_vendor/foundation/scss/util/_value.scss +160 -0
  110. data/assets/_vendor/foundation/scss/xy-grid/_cell.scss +169 -0
  111. data/assets/_vendor/foundation/scss/xy-grid/_classes.scss +476 -0
  112. data/assets/_vendor/foundation/scss/xy-grid/_collapse.scss +74 -0
  113. data/assets/_vendor/foundation/scss/xy-grid/_frame.scss +85 -0
  114. data/assets/_vendor/foundation/scss/xy-grid/_grid.scss +35 -0
  115. data/assets/_vendor/foundation/scss/xy-grid/_gutters.scss +45 -0
  116. data/assets/_vendor/foundation/scss/xy-grid/_layout.scss +33 -0
  117. data/assets/_vendor/foundation/scss/xy-grid/_position.scss +28 -0
  118. data/assets/_vendor/foundation/scss/xy-grid/_xy-grid.scss +51 -0
  119. data/assets/_vendor/motion-ui/_classes.scss +109 -0
  120. data/assets/_vendor/motion-ui/_settings.scss +61 -0
  121. data/assets/_vendor/motion-ui/effects/_fade.scss +32 -0
  122. data/assets/_vendor/motion-ui/effects/_hinge.scss +65 -0
  123. data/assets/_vendor/motion-ui/effects/_shake.scss +15 -0
  124. data/assets/_vendor/motion-ui/effects/_slide.scss +41 -0
  125. data/assets/_vendor/motion-ui/effects/_spin.scss +28 -0
  126. data/assets/_vendor/motion-ui/effects/_wiggle.scss +13 -0
  127. data/assets/_vendor/motion-ui/effects/_zoom.scss +15 -0
  128. data/assets/_vendor/motion-ui/motion-ui.scss +29 -0
  129. data/assets/_vendor/motion-ui/transitions/_fade.scss +28 -0
  130. data/assets/_vendor/motion-ui/transitions/_hinge.scss +43 -0
  131. data/assets/_vendor/motion-ui/transitions/_slide.scss +42 -0
  132. data/assets/_vendor/motion-ui/transitions/_spin.scss +39 -0
  133. data/assets/_vendor/motion-ui/transitions/_zoom.scss +39 -0
  134. data/assets/_vendor/motion-ui/util/_animation.scss +7 -0
  135. data/assets/_vendor/motion-ui/util/_args.scss +15 -0
  136. data/assets/_vendor/motion-ui/util/_keyframe.scss +136 -0
  137. data/assets/_vendor/motion-ui/util/_selector.scss +23 -0
  138. data/assets/_vendor/motion-ui/util/_series.scss +54 -0
  139. data/assets/_vendor/motion-ui/util/_transition.scss +45 -0
  140. data/assets/_vendor/motion-ui/util/_unit.scss +7 -0
  141. data/assets/bedrock/js/bedrock.js +22993 -0
  142. data/assets/bedrock/scss/_bedrock-components.scss +15 -0
  143. data/assets/bedrock/scss/_bedrock-settings.scss +45 -0
  144. data/assets/bedrock/scss/_foundation-components.scss +50 -0
  145. data/assets/bedrock/scss/_foundation-settings.scss +869 -0
  146. data/assets/bedrock/scss/bedrock.scss +7 -0
  147. data/assets/bedrock/scss/components/global.scss +55 -0
  148. data/assets/bedrock/scss/components/header.scss +60 -0
  149. data/assets/bedrock/scss/components/helper-classes.scss +53 -0
  150. data/assets/bedrock/scss/components/logo-bar.scss +45 -0
  151. data/assets/bedrock/scss/components/off-canvas-menu.scss +359 -0
  152. data/assets/bedrock/scss/components/panel.scss +121 -0
  153. data/assets/bedrock/scss/components/tiny-mce-editor.scss +74 -0
  154. data/lib/bedrock_sass/version.rb +1 -1
  155. metadata +153 -2
@@ -0,0 +1,33 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group xy-grid
7
+ ////
8
+
9
+ /// Sizes child elements so that `$n` number of items appear on each row.
10
+ ///
11
+ /// @param {Number} $n - Number of elements to display per row.
12
+ /// @param {String} $selector ['.cell'] - Selector(s) to use for child elements.
13
+ /// @param {Boolean} $gutter-output [true] - Whether or not to output gutters
14
+ /// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters.
15
+ /// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin` or `padding`.
16
+ /// @param {List} $gutter-position [right left] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination.
17
+ /// @param {Boolean} $vertical [false] - Set to true to output vertical (height) styles rather than widths.
18
+ @mixin xy-grid-layout(
19
+ $n,
20
+ $selector: '.cell',
21
+ $gutter-output: true,
22
+ $gutters: $grid-margin-gutters,
23
+ $gutter-type: margin,
24
+ $gutter-position: right left,
25
+ $breakpoint: $-zf-zero-breakpoint,
26
+ $vertical: false
27
+ ) {
28
+ $size: percentage(1/$n);
29
+
30
+ & > #{$selector} {
31
+ @include xy-cell($size, $gutter-output, $gutters, $gutter-type, $gutter-position, $breakpoint, $vertical);
32
+ }
33
+ }
@@ -0,0 +1,28 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group xy-grid
7
+ ////
8
+
9
+ /// Offsets a column to the right/bottom by `$n` columns.
10
+ ///
11
+ /// @param {Number|List} $n - Size to offset by. You can pass in any value accepted by the `zf-cell()` mixin, such as `6`, `50%`, or `1 of 2`.
12
+ /// @param {Boolean} $vertical [false] Sets the direction of the offset. If set to true will apply margin-top instead.
13
+ @mixin xy-cell-offset(
14
+ $n,
15
+ $gutters: $grid-margin-gutters,
16
+ $gutter-type: margin,
17
+ $breakpoint: $-zf-zero-breakpoint,
18
+ $vertical: false
19
+ ) {
20
+ $direction: if($vertical, 'top', $global-left);
21
+
22
+ @include -zf-breakpoint-value($breakpoint, $gutters) {
23
+ $gutter: rem-calc($-zf-bp-value) / 2;
24
+ $size: if($gutter-type == 'margin', calc(#{xy-cell-size($n)} + #{$gutter}), #{xy-cell-size($n)});
25
+
26
+ margin-#{$direction}: #{$size};
27
+ }
28
+ }
@@ -0,0 +1,51 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group xy-grid
7
+ ////
8
+
9
+ /// Enables the XY grid.
10
+ /// @type Boolean
11
+ $xy-grid: true !default;
12
+
13
+ /// The maximum width of a grid container.
14
+ /// @type Number
15
+ $grid-container: $global-width !default;
16
+
17
+ /// The number of columns used in the grid.
18
+ /// @type Number
19
+ $grid-columns: 12 !default;
20
+
21
+ /// The amount of margin between cells at different screen sizes when using the margin grid. To use just one size, set the variable to a number instead of a map.
22
+ /// @type Map | Length
23
+ $grid-margin-gutters: (
24
+ small: 20px,
25
+ medium: 30px
26
+ ) !default;
27
+
28
+ /// The amount of padding in cells at different screen sizes when using the padding grid. To use just one size, set the variable to a number instead of a map.
29
+ /// @type Map | Length
30
+ $grid-padding-gutters: $grid-margin-gutters !default;
31
+
32
+ /// The amount of padding to use when padding the grid-container.
33
+ /// @type Map | Length
34
+ $grid-container-padding: $grid-padding-gutters !default;
35
+
36
+ /// The maximum width to apply to a grid container
37
+ /// @type Number
38
+ $grid-container-max: $global-width !default;
39
+
40
+ /// The maximum number of cells in an XY block grid.
41
+ /// @type Number
42
+ $xy-block-grid-max: 8 !default;
43
+
44
+ @import 'gutters';
45
+ @import 'grid';
46
+ @import 'cell';
47
+ @import 'frame';
48
+ @import 'position';
49
+ @import 'layout';
50
+ @import 'collapse';
51
+ @import 'classes';
@@ -0,0 +1,109 @@
1
+ // scss-lint:disable ImportantRule, SpaceAfterComma, SingleLinePerProperty
2
+
3
+ @mixin -motion-ui-defaults {
4
+ transition-duration: map-get($motion-ui-speeds, default);
5
+ transition-timing-function: map-get($motion-ui-easings, default);
6
+ }
7
+
8
+ // Transitions
9
+ // - - - - - - - - - - - - - - -
10
+ @mixin motion-ui-transitions {
11
+ // Slide
12
+ .slide-in-down { @include mui-slide(in, down); }
13
+ .slide-in-left { @include mui-slide(in, right); }
14
+ .slide-in-up { @include mui-slide(in, up); }
15
+ .slide-in-right { @include mui-slide(in, left); }
16
+ .slide-out-down { @include mui-slide(out, down); }
17
+ .slide-out-right { @include mui-slide(out, right); }
18
+ .slide-out-up { @include mui-slide(out, up); }
19
+ .slide-out-left { @include mui-slide(out, left); }
20
+
21
+ // Fade
22
+ .fade-in { @include mui-fade(in, 0, 1); }
23
+ .fade-out { @include mui-fade(out, 1, 0); }
24
+
25
+ // Hinge
26
+ .hinge-in-from-top { @include mui-hinge(in, top); }
27
+ .hinge-in-from-right { @include mui-hinge(in, right); }
28
+ .hinge-in-from-bottom { @include mui-hinge(in, bottom); }
29
+ .hinge-in-from-left { @include mui-hinge(in, left); }
30
+ .hinge-in-from-middle-x { @include mui-hinge(in, top, center); }
31
+ .hinge-in-from-middle-y { @include mui-hinge(in, right, center); }
32
+ .hinge-out-from-top { @include mui-hinge(out, top); }
33
+ .hinge-out-from-right { @include mui-hinge(out, right); }
34
+ .hinge-out-from-bottom { @include mui-hinge(out, bottom); }
35
+ .hinge-out-from-left { @include mui-hinge(out, left); }
36
+ .hinge-out-from-middle-x { @include mui-hinge(out, top, center); }
37
+ .hinge-out-from-middle-y { @include mui-hinge(out, right, center); }
38
+
39
+ // Scale
40
+ .scale-in-up { @include mui-zoom(in, 0.5, 1); }
41
+ .scale-in-down { @include mui-zoom(in, 1.5, 1); }
42
+ .scale-out-up { @include mui-zoom(out, 1, 1.5); }
43
+ .scale-out-down { @include mui-zoom(out, 1, 0.5); }
44
+
45
+ // Spin
46
+ .spin-in { @include mui-spin(in, cw); }
47
+ .spin-out { @include mui-spin(out, cw); }
48
+ .spin-in-ccw { @include mui-spin(in, ccw); }
49
+ .spin-out-ccw { @include mui-spin(out, ccw); }
50
+
51
+ // Transition Modifiers
52
+ // - - - - - - - - - - - - - - -
53
+
54
+ @each $name, $value in $motion-ui-speeds {
55
+ @if $name != default {
56
+ .#{$name} { transition-duration: $value !important; }
57
+ }
58
+ }
59
+
60
+ @each $name, $value in $motion-ui-easings {
61
+ @if $name != default {
62
+ .#{$name} { transition-timing-function: $value !important; }
63
+ }
64
+ }
65
+
66
+ @each $name, $value in $motion-ui-delays {
67
+ @if $name != default {
68
+ .#{$name}-delay { transition-delay: $value !important; }
69
+ }
70
+ }
71
+ }
72
+
73
+ // Animations
74
+ // - - - - - - - - - - - - - - -
75
+ @mixin motion-ui-animations {
76
+ .shake { @include mui-animation(shake); }
77
+ .spin-cw { @include mui-animation(spin); }
78
+ .spin-ccw { @include mui-animation(spin(ccw)); }
79
+ .wiggle { @include mui-animation(wiggle); }
80
+
81
+ .shake,
82
+ .spin-cw,
83
+ .spin-ccw,
84
+ .wiggle {
85
+ animation-duration: map-get($motion-ui-speeds, default);
86
+ }
87
+
88
+ // Animation Modifiers
89
+ // - - - - - - - - - - - - - - -
90
+ .infinite { animation-iteration-count: infinite; }
91
+
92
+ @each $name, $value in $motion-ui-speeds {
93
+ @if $name != default {
94
+ .#{$name} { animation-duration: $value !important; }
95
+ }
96
+ }
97
+
98
+ @each $name, $value in $motion-ui-easings {
99
+ @if $name != default {
100
+ .#{$name} { animation-timing-function: $value !important; }
101
+ }
102
+ }
103
+
104
+ @each $name, $value in $motion-ui-delays {
105
+ @if $name != default {
106
+ .#{$name}-delay { animation-delay: $value !important; }
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,61 @@
1
+ /// Format for CSS classes created with Motion UI.
2
+ /// @type Map
3
+ /// @prop {Boolean} append [true] - Defines if selectors are chained to the selector (`.class.enter`), or appended as a new class (`.class-enter`).
4
+ /// @prop {String} prefix ['mui-'] - Prefix to add before the state of a class. Enter an empty string to use no prefix.
5
+ /// @prop {String} prefix ['-active'] - Suffix to add to the active state class.
6
+ $motion-ui-classes: (
7
+ chain: true,
8
+ prefix: 'mui-',
9
+ active: '-active',
10
+ ) !default;
11
+
12
+ /// State names to reference when writing motion classes. To use multiple class names for one state, enter a list of strings instead of one string.
13
+ /// @type Map
14
+ $motion-ui-states: (
15
+ in: 'enter',
16
+ out: 'leave',
17
+ ) !default;
18
+
19
+ /// Default speed that transitions and animations play at, along with values for modifier classes to change the speed.
20
+ /// @type Map
21
+ $motion-ui-speeds: (
22
+ default: 500ms,
23
+ slow: 750ms,
24
+ fast: 250ms,
25
+ ) !default;
26
+
27
+ /// Default delay to add before motion, along with values for modifier classes to change the delay.
28
+ /// @type Map
29
+ $motion-ui-delays: (
30
+ default: 0,
31
+ short: 300ms,
32
+ long: 700ms,
33
+ ) !default;
34
+
35
+ /// Default easing for transitions and animations, along with values for modifier classes to change the easing.
36
+ /// @type Map
37
+ $motion-ui-easings: (
38
+ default: linear,
39
+ linear: linear,
40
+ ease: ease,
41
+ ease-in: ease-in,
42
+ ease-out: ease-out,
43
+ ease-in-out: ease-in-out,
44
+ bounce-in: cubic-bezier(0.485, 0.155, 0.24, 1.245),
45
+ bounce-out: cubic-bezier(0.485, 0.155, 0.515, 0.845),
46
+ bounce-in-out: cubic-bezier(0.76, -0.245, 0.24, 1.245),
47
+ ) !default;
48
+
49
+ /// Miscellaneous settings related to Motion UI.
50
+ /// @type Map
51
+ /// @prop {Boolean} slide-and-fade [false] - Defines if slide motions should also fade in/out.
52
+ /// @prop {Boolean} slide-and-fade [true] - Defines if hinge motions should also fade in/out.
53
+ /// @prop {Boolean} slide-and-fade [true] - Defines if scale motions should also fade in/out.
54
+ /// @prop {Boolean} slide-and-fade [true] - Defines if spin motions should also fade in/out.
55
+ $motion-ui-settings: (
56
+ slide-and-fade: false,
57
+ hinge-and-fade: true,
58
+ scale-and-fade: true,
59
+ spin-and-fade: true,
60
+ activate-queue-class: 'is-animating',
61
+ ) !default;
@@ -0,0 +1,32 @@
1
+ /// Creates a fading animation.
2
+ /// @param {Number} $from [0] - Opacity to start at.
3
+ /// @param {Number} $to [1] - Opacity to end at.
4
+ /// @return {Map} A keyframes map that can be used with the `generate-keyframes()` mixin.
5
+ @function fade(
6
+ $from: 0,
7
+ $to: 1
8
+ ) {
9
+ $type: type-of($from);
10
+ $keyframes: ();
11
+
12
+ @if $type == 'string' {
13
+ @if $from == in {
14
+ $from: 0;
15
+ $to: 1;
16
+ } @else if $from == out {
17
+ $from: 1;
18
+ $to: 0;
19
+ }
20
+ }
21
+
22
+ $fromName: $from * 100;
23
+ $toName: $to * 100;
24
+
25
+ $keyframes: (
26
+ name: 'fade-#{$fromName}-to-#{$toName}',
27
+ 0: (opacity: $from),
28
+ 100: (opacity: $to),
29
+ );
30
+
31
+ @return $keyframes;
32
+ }
@@ -0,0 +1,65 @@
1
+ /// Creates a hinge effect by rotating the element.
2
+ /// @param {Keyword} $state [in] - State to transition to.
3
+ /// @param {Keyword} $from [left] - Edge of the element to rotate from. Can be `top`, `right`, `bottom`, or `left`.
4
+ /// @param {Keyword} $axis [edge] - Axis of the element to rotate on. Can be `edge` or `center`.
5
+ /// @param {Number} $perspective [2000px] - Perceived distance between the viewer and the element. A higher number will make the rotation effect more pronounced.
6
+ /// @param {Keyword} $turn-origin [from-back] - Side of the element to start the rotation from. Can be `from-back` or `from-front`.
7
+ @function hinge (
8
+ $state: in,
9
+ $from: left,
10
+ $axis: edge,
11
+ $perspective: 2000px,
12
+ $turn-origin: from-back
13
+ ) {
14
+ // Rotation directions when hinging from back vs. front
15
+ $rotation-amount: 90deg;
16
+ $rotations-back: (
17
+ top: rotateX($rotation-amount * -1),
18
+ right: rotateY($rotation-amount * -1),
19
+ bottom: rotateX($rotation-amount),
20
+ left: rotateY($rotation-amount),
21
+ );
22
+ $rotations-from: (
23
+ top: rotateX($rotation-amount),
24
+ right: rotateY($rotation-amount),
25
+ bottom: rotateX($rotation-amount * -1),
26
+ left: rotateY($rotation-amount * -1),
27
+ );
28
+
29
+ // Rotation origin
30
+ $rotation: '';
31
+ @if $turn-origin == from-front {
32
+ $rotation: map-get($rotations-from, $from);
33
+ } @else if $turn-origin == from-back {
34
+ $rotation: map-get($rotations-back, $from);
35
+ } @else {
36
+ @warn '$turn-origin must be either "from-back" or "from-front"';
37
+ }
38
+
39
+ // Start and end state
40
+ $start: '';
41
+ $end: '';
42
+ @if $state == in {
43
+ $start: perspective($perspective) $rotation;
44
+ $end: perspective($perspective) rotate(0deg);
45
+ } @else {
46
+ $start: perspective($perspective) rotate(0deg);
47
+ $end: perspective($perspective) $rotation;
48
+ }
49
+
50
+ // Turn axis
51
+ $origin: '';
52
+ @if $axis == edge {
53
+ $origin: $from;
54
+ } @else {
55
+ $origin: center;
56
+ }
57
+
58
+ $keyframes: (
59
+ name: 'hinge-#{$state}-#{$from}-#{$axis}-#{$turn-origin}',
60
+ 0: (transform: $start, transform-origin: $origin),
61
+ 100: (transform: $end),
62
+ );
63
+
64
+ @return $keyframes;
65
+ }
@@ -0,0 +1,15 @@
1
+ /// Creates a shaking animation.
2
+ /// @param {Percentage} $intensity [7%] - Intensity of the shake, as a percentage value.
3
+ /// @return {Map} A keyframes map that can be used with the `generate-keyframes()` mixin.
4
+ @function shake($intensity: 7%) {
5
+ $right: (0, 10, 20, 30, 40, 50, 60, 70, 80, 90);
6
+ $left: (5, 15, 25, 35, 45, 55, 65, 75, 85, 95);
7
+
8
+ $keyframes: (
9
+ name: 'shake-#{($intensity / 1%)}',
10
+ $right: (transform: translateX($intensity)),
11
+ $left: (transform: translateX(-$intensity)),
12
+ );
13
+
14
+ @return $keyframes;
15
+ }
@@ -0,0 +1,41 @@
1
+ /// Creates a sliding animation.
2
+ /// @param {Keyword} $state [in] - Whether to move to (`in`) or from (`out`) the element's default position.
3
+ /// @param {Keyword} $direction [up] - Direction to move. Can be `up`, `down`, `left`, or `right`.
4
+ /// @param {Number} $amount [100%] - Distance to move. Can be any CSS length unit.
5
+ /// @return {Map} A keyframes map that can be used with the `generate-keyframes()` mixin.
6
+ @function slide(
7
+ $state: in,
8
+ $direction: up,
9
+ $amount: 100%
10
+ ) {
11
+ $from: $amount;
12
+ $to: 0;
13
+ $func: 'translateY';
14
+
15
+ @if $direction == left or $direction == right {
16
+ $func: 'translateX';
17
+ }
18
+
19
+ @if $state == out {
20
+ $from: 0;
21
+ $to: $amount;
22
+ }
23
+
24
+ @if $direction == down or $direction == right {
25
+ @if $state == in {
26
+ $from: -$from;
27
+ }
28
+ } @else {
29
+ @if $state == out {
30
+ $to: -$to;
31
+ }
32
+ }
33
+
34
+ $keyframes: (
35
+ name: 'slide-#{$state}-#{$direction}-#{strip-unit($amount)}',
36
+ 0: (transform: '#{$func}(#{$from})'),
37
+ 100: (transform: '#{$func}(#{$to})'),
38
+ );
39
+
40
+ @return $keyframes;
41
+ }
@@ -0,0 +1,28 @@
1
+ /// Creates a spinning animation.
2
+ /// @param {Keyword} $direction [cw] - Direction to spin. Should be `cw` (clockwise) or `ccw` (counterclockwise).
3
+ /// @param {Number} $amount [360deg] - Amount to spin. Can be any CSS angle unit.
4
+ /// @return {Map} A keyframes map that can be used with the `generate-keyframes()` mixin.
5
+ @function spin(
6
+ $state: in,
7
+ $direction: cw,
8
+ $amount: 1turn
9
+ ) {
10
+ $start: 0;
11
+ $end: 0;
12
+
13
+ @if $state == in {
14
+ $start: if($direction == ccw, $amount, $amount * -1);
15
+ $end: 0;
16
+ } @else {
17
+ $start: 0;
18
+ $end: if($direction == ccw, $amount * -1, $amount);
19
+ }
20
+
21
+ $keyframes: (
22
+ name: 'spin-#{$direction}-#{$amount}',
23
+ 0: (transform: rotate($start)),
24
+ 100: (transform: rotate($end)),
25
+ );
26
+
27
+ @return $keyframes;
28
+ }
@@ -0,0 +1,13 @@
1
+ /// Creates a wiggling animation.
2
+ /// @param {Number} $intensity [7deg] - Intensity of the wiggle. Can be any CSS angle unit.
3
+ /// @return {Map} A keyframes map that can be used with the `generate-keyframes()` mixin.
4
+ @function wiggle($intensity: 7deg) {
5
+ $keyframes: (
6
+ name: 'wiggle-#{$intensity}',
7
+ (40, 50, 60): (transform: rotate($intensity)),
8
+ (35, 45, 55, 65): (transform: rotate(-$intensity)),
9
+ (0, 30, 70, 100): (transform: rotate(0)),
10
+ );
11
+
12
+ @return $keyframes;
13
+ }
@@ -0,0 +1,15 @@
1
+ /// Creates a scaling transition. A scale of `1` means the element is the same size. Larger numbers make the element bigger, while numbers less than 1 make the element smaller.
2
+ /// @param {Number} $from [1.5] - Size to start at.
3
+ /// @param {Number} $to [1] - Size to end at.
4
+ @function zoom(
5
+ $from: 0,
6
+ $to: 1
7
+ ) {
8
+ $keyframes: (
9
+ name: 'scale-#{$to}-to-#{$from}',
10
+ 0: (transform: scale($from)),
11
+ 100: (transform: scale($to)),
12
+ );
13
+
14
+ @return $keyframes;
15
+ }
@@ -0,0 +1,29 @@
1
+ // Motion UI by ZURB
2
+ // foundation.zurb.com/motion-ui
3
+ // Licensed under MIT Open Source
4
+
5
+ @import 'settings';
6
+
7
+ @import 'util/animation';
8
+ @import 'util/args';
9
+ @import 'util/keyframe';
10
+ @import 'util/selector';
11
+ @import 'util/series';
12
+ @import 'util/transition';
13
+ @import 'util/unit';
14
+
15
+ @import 'effects/fade';
16
+ @import 'effects/hinge';
17
+ @import 'effects/spin';
18
+ @import 'effects/zoom';
19
+ @import 'effects/shake';
20
+ @import 'effects/slide';
21
+ @import 'effects/wiggle';
22
+
23
+ @import 'transitions/fade';
24
+ @import 'transitions/hinge';
25
+ @import 'transitions/zoom';
26
+ @import 'transitions/slide';
27
+ @import 'transitions/spin';
28
+
29
+ @import 'classes';
@@ -0,0 +1,28 @@
1
+ /// Creates a fade transition by adjusting the opacity of the element.
2
+ /// @param {Keyword} $state [in] - State to transition to.
3
+ /// @param {Number} $from [0] - Opacity to start at. Must be a number between 0 and 1.
4
+ /// @param {Number} $to [1] - Opacity to end on.
5
+ /// @param {Keyword} $duration [null] - Length (speed) of the transition.
6
+ /// @param {Keyword|Function} $timing [null] - Easing of the transition.
7
+ /// @param {Duration} $delay [null] - Delay in seconds or milliseconds before the transition starts.
8
+ @mixin mui-fade(
9
+ $state: in,
10
+ $from: 0,
11
+ $to: 1,
12
+ $duration: null,
13
+ $timing: null,
14
+ $delay: null
15
+ ) {
16
+ $fade: fade($from, $to);
17
+
18
+ @include transition-start($state) {
19
+ @include transition-basics($duration, $timing, $delay);
20
+ @include -mui-keyframe-get($fade, 0);
21
+
22
+ transition-property: opacity;
23
+ }
24
+
25
+ @include transition-end($state) {
26
+ @include -mui-keyframe-get($fade, 100);
27
+ }
28
+ }
@@ -0,0 +1,43 @@
1
+ /// Creates a hinge transition by rotating the element.
2
+ /// @param {Keyword} $state [in] - State to transition to.
3
+ /// @param {Keyword} $from [left] - Edge of the element to rotate from. Can be `top`, `right`, `bottom`, or `left`.
4
+ /// @param {Keyword} $axis [edge] - Axis of the element to rotate on. Can be `edge` or `center`.
5
+ /// @param {Length} $perspective [2000px] - Perceived distance between the viewer and the element. A higher number will make the rotation effect more pronounced.
6
+ /// @param {Keyword} $turn-origin [from-back] - Side of the element to start the rotation from. Can be `from-back` or `from-front`.
7
+ /// @param {Boolean} $fade [true] - Set to `true` to fade the element in or out simultaneously.
8
+ /// @param {Duration} $duration [null] - Length (speed) of the transition.
9
+ /// @param {Keyword|Function} $timing [null] - Easing of the transition.
10
+ /// @param {Duration} $delay [null] - Delay in seconds or milliseconds before the transition starts.
11
+ @mixin mui-hinge (
12
+ $state: in,
13
+ $from: left,
14
+ $axis: edge,
15
+ $perspective: 2000px,
16
+ $turn-origin: from-back,
17
+ $fade: map-get($motion-ui-settings, hinge-and-fade),
18
+ $duration: null,
19
+ $timing: null,
20
+ $delay: null
21
+ ) {
22
+ $hinge: hinge($state, $from, $axis, $perspective, $turn-origin);
23
+
24
+ @include transition-start($state) {
25
+ @include transition-basics($duration, $timing, $delay);
26
+ @include -mui-keyframe-get($hinge, 0);
27
+
28
+ @if $fade {
29
+ transition-property: transform, opacity;
30
+ opacity: if($state == in, 0, 1);
31
+ } @else {
32
+ transition-property: transform, opacity;
33
+ }
34
+ }
35
+
36
+ @include transition-end($state) {
37
+ @include -mui-keyframe-get($hinge, 100);
38
+
39
+ @if $fade {
40
+ opacity: if($state == in, 1, 0);
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,42 @@
1
+ /// Creates a sliding transition by translating the element horizontally or vertically.
2
+ /// @param {Keyword} $state [in] - State to transition to.
3
+ /// @param {Keyword} $direction [left] - Direction to slide to. Can be `up`, `right`, `down`, or `left`.
4
+ /// @param {Length} $amount [100%] - Length of the slide as a percentage value.
5
+ /// @param {Boolean} $fade [false] - Set to `true` to fade the element in or out simultaneously.
6
+ /// @param {Duration} $duration [null] - Length (speed) of the transition.
7
+ /// @param {Keyword|Function} $timing [null] - Easing of the transition.
8
+ /// @param {Duration} $delay [null] - Delay in seconds or milliseconds before the transition starts.
9
+ @mixin mui-slide (
10
+ $state: in,
11
+ $direction: left,
12
+ $amount: 100%,
13
+ $fade: map-get($motion-ui-settings, slide-and-fade),
14
+ $duration: null,
15
+ $timing: null,
16
+ $delay: null
17
+ ) {
18
+ $slide: slide($state, $direction, $amount);
19
+
20
+ // CSS Output
21
+ @include transition-start($state) {
22
+ @include transition-basics($duration, $timing, $delay);
23
+ @include -mui-keyframe-get($slide, 0);
24
+
25
+ @if $fade {
26
+ transition-property: transform, opacity;
27
+ opacity: if($state == in, 0, 1);
28
+ } @else {
29
+ transition-property: transform, opacity;
30
+ }
31
+
32
+ backface-visibility: hidden;
33
+ }
34
+
35
+ @include transition-end($state) {
36
+ @include -mui-keyframe-get($slide, 100);
37
+
38
+ @if $fade {
39
+ opacity: if($state == in, 1, 0);
40
+ }
41
+ }
42
+ }