locomotivecms_wagon 2.2.0.beta1 → 2.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/generators/blank/config/metafields_schema.yml +1 -1
  4. data/generators/bootstrap/config/metafields_schema.yml +1 -1
  5. data/generators/{foundation5 → foundation}/Gemfile.tt +1 -1
  6. data/generators/{foundation5 → foundation}/Guardfile +0 -0
  7. data/generators/foundation/app/content_types/.gitkeep +0 -0
  8. data/generators/foundation/app/views/pages/404.liquid +11 -0
  9. data/generators/{foundation5 → foundation}/app/views/pages/404.liquid.haml +4 -3
  10. data/generators/{foundation5 → foundation}/app/views/pages/index.liquid +54 -78
  11. data/generators/foundation/app/views/pages/index.liquid.haml +144 -0
  12. data/generators/foundation/app/views/snippets/.gitkeep +0 -0
  13. data/generators/{foundation5 → foundation}/config/deploy.yml +2 -1
  14. data/generators/{foundation5 → foundation}/config/metafields_schema.yml +1 -1
  15. data/generators/{foundation5/config/site.yml.tt → foundation/config/site.yml} +2 -2
  16. data/generators/{foundation5 → foundation}/config/translations.yml +0 -0
  17. data/generators/foundation/data/.gitkeep +0 -0
  18. data/generators/foundation/log/.gitkeep +0 -0
  19. data/generators/foundation/public/images/.gitkeep +0 -0
  20. data/generators/foundation/public/javascripts/app.js +1 -0
  21. data/generators/foundation/public/javascripts/vendor/foundation.js +7472 -0
  22. data/generators/foundation/public/javascripts/vendor/foundation.min.js +3 -0
  23. data/generators/foundation/public/javascripts/vendor/what-input.js +212 -0
  24. data/generators/foundation/public/javascripts/vendor/what-input.min.js +1 -0
  25. data/generators/foundation/public/stylesheets/_settings.scss +529 -0
  26. data/generators/foundation/public/stylesheets/app.css +3 -0
  27. data/generators/foundation/public/stylesheets/app.scss +43 -0
  28. data/generators/foundation/public/stylesheets/foundation.css +3499 -0
  29. data/generators/foundation/public/stylesheets/foundation6/_global.scss +197 -0
  30. data/generators/foundation/public/stylesheets/foundation6/components/_accordion-menu.scss +28 -0
  31. data/generators/foundation/public/stylesheets/foundation6/components/_accordion.scss +112 -0
  32. data/generators/foundation/public/stylesheets/foundation6/components/_badge.scss +55 -0
  33. data/generators/foundation/public/stylesheets/foundation6/components/_breadcrumbs.scss +94 -0
  34. data/generators/foundation/public/stylesheets/foundation6/components/_button-group.scss +115 -0
  35. data/generators/foundation/public/stylesheets/foundation6/components/_button.scss +264 -0
  36. data/generators/foundation/public/stylesheets/foundation6/components/_callout.scss +115 -0
  37. data/generators/foundation/public/stylesheets/foundation6/components/_close-button.scss +61 -0
  38. data/generators/foundation/public/stylesheets/foundation6/components/_drilldown.scss +67 -0
  39. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown-menu.scss +123 -0
  40. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown.scss +64 -0
  41. data/generators/foundation/public/stylesheets/foundation6/components/_flex-video.scss +68 -0
  42. data/generators/foundation/public/stylesheets/foundation6/components/_float.scss +27 -0
  43. data/generators/foundation/public/stylesheets/foundation6/components/_label.scss +56 -0
  44. data/generators/foundation/public/stylesheets/foundation6/components/_media-object.scss +74 -0
  45. data/generators/foundation/public/stylesheets/foundation6/components/_menu.scss +213 -0
  46. data/generators/foundation/public/stylesheets/foundation6/components/_off-canvas.scss +170 -0
  47. data/generators/foundation/public/stylesheets/foundation6/components/_orbit.scss +186 -0
  48. data/generators/foundation/public/stylesheets/foundation6/components/_pagination.scss +161 -0
  49. data/generators/foundation/public/stylesheets/foundation6/components/_progress-bar.scss +83 -0
  50. data/generators/foundation/public/stylesheets/foundation6/components/_reveal.scss +155 -0
  51. data/generators/foundation/public/stylesheets/foundation6/components/_slider.scss +158 -0
  52. data/generators/foundation/public/stylesheets/foundation6/components/_sticky.scss +38 -0
  53. data/generators/foundation/public/stylesheets/foundation6/components/_switch.scss +231 -0
  54. data/generators/foundation/public/stylesheets/foundation6/components/_table.scss +212 -0
  55. data/generators/foundation/public/stylesheets/foundation6/components/_tabs.scss +137 -0
  56. data/generators/foundation/public/stylesheets/foundation6/components/_thumbnail.scss +54 -0
  57. data/generators/foundation/public/stylesheets/foundation6/components/_title-bar.scss +44 -0
  58. data/generators/foundation/public/stylesheets/foundation6/components/_tooltip.scss +110 -0
  59. data/generators/foundation/public/stylesheets/foundation6/components/_top-bar.scss +57 -0
  60. data/generators/foundation/public/stylesheets/foundation6/components/_visibility.scss +131 -0
  61. data/generators/foundation/public/stylesheets/foundation6/forms/_checkbox.scss +36 -0
  62. data/generators/foundation/public/stylesheets/foundation6/forms/_error.scss +81 -0
  63. data/generators/foundation/public/stylesheets/foundation6/forms/_fieldset.scss +53 -0
  64. data/generators/foundation/public/stylesheets/foundation6/forms/_forms.scss +32 -0
  65. data/generators/foundation/public/stylesheets/foundation6/forms/_help-text.scss +30 -0
  66. data/generators/foundation/public/stylesheets/foundation6/forms/_input-group.scss +70 -0
  67. data/generators/foundation/public/stylesheets/foundation6/forms/_label.scss +48 -0
  68. data/generators/foundation/public/stylesheets/foundation6/forms/_select.scss +64 -0
  69. data/generators/foundation/public/stylesheets/foundation6/forms/_text.scss +153 -0
  70. data/generators/foundation/public/stylesheets/foundation6/foundation.scss +91 -0
  71. data/generators/foundation/public/stylesheets/foundation6/grid/_classes.scss +132 -0
  72. data/generators/foundation/public/stylesheets/foundation6/grid/_column.scss +112 -0
  73. data/generators/foundation/public/stylesheets/foundation6/grid/_flex-grid.scss +191 -0
  74. data/generators/foundation/public/stylesheets/foundation6/grid/_grid.scss +33 -0
  75. data/generators/foundation/public/stylesheets/foundation6/grid/_gutter.scss +31 -0
  76. data/generators/foundation/public/stylesheets/foundation6/grid/_layout.scss +32 -0
  77. data/generators/foundation/public/stylesheets/foundation6/grid/_position.scss +71 -0
  78. data/generators/foundation/public/stylesheets/foundation6/grid/_row.scss +72 -0
  79. data/generators/foundation/public/stylesheets/foundation6/grid/_size.scss +24 -0
  80. data/generators/foundation/public/stylesheets/foundation6/motion-ui/_classes.scss +102 -0
  81. data/generators/foundation/public/stylesheets/foundation6/motion-ui/_settings.scss +61 -0
  82. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_fade.scss +29 -0
  83. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_hinge.scss +65 -0
  84. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_shake.scss +15 -0
  85. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_slide.scss +41 -0
  86. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_spin.scss +28 -0
  87. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_wiggle.scss +13 -0
  88. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_zoom.scss +15 -0
  89. data/generators/foundation/public/stylesheets/foundation6/motion-ui/motion-ui.scss +29 -0
  90. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_fade.scss +28 -0
  91. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_hinge.scss +43 -0
  92. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss +42 -0
  93. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_spin.scss +39 -0
  94. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_zoom.scss +39 -0
  95. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_animation.scss +7 -0
  96. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_args.scss +15 -0
  97. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_keyframe.scss +136 -0
  98. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss +23 -0
  99. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_series.scss +54 -0
  100. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_transition.scss +45 -0
  101. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_unit.scss +7 -0
  102. data/generators/foundation/public/stylesheets/foundation6/motion-ui.scss +4 -0
  103. data/generators/foundation/public/stylesheets/foundation6/settings/_settings.scss +531 -0
  104. data/generators/foundation/public/stylesheets/foundation6/typography/_alignment.scss +21 -0
  105. data/generators/foundation/public/stylesheets/foundation6/typography/_base.scss +436 -0
  106. data/generators/foundation/public/stylesheets/foundation6/typography/_helpers.scss +77 -0
  107. data/generators/foundation/public/stylesheets/foundation6/typography/_print.scss +73 -0
  108. data/generators/foundation/public/stylesheets/foundation6/typography/_typography.scss +28 -0
  109. data/generators/foundation/public/stylesheets/foundation6/util/_breakpoint.scss +182 -0
  110. data/generators/foundation/public/stylesheets/foundation6/util/_color.scss +41 -0
  111. data/generators/foundation/public/stylesheets/foundation6/util/_mixins.scss +190 -0
  112. data/generators/foundation/public/stylesheets/foundation6/util/_selector.scss +39 -0
  113. data/generators/foundation/public/stylesheets/foundation6/util/_unit.scss +69 -0
  114. data/generators/foundation/public/stylesheets/foundation6/util/_util.scss +15 -0
  115. data/generators/foundation/public/stylesheets/foundation6/util/_value.scss +117 -0
  116. data/generators/{foundation5/public/stylesheets/normalize.css.scss → foundation/public/stylesheets/foundation6/vendor/normalize.scss} +8 -11
  117. data/generators/site_metafields/schema.yml.tt +1 -1
  118. data/lib/locomotive/wagon/commands/push_command.rb +1 -0
  119. data/lib/locomotive/wagon/commands/serve_command.rb +1 -0
  120. data/lib/locomotive/wagon/decorators/concerns/persist_assets_concern.rb +3 -3
  121. data/lib/locomotive/wagon/decorators/content_type_decorator.rb +5 -1
  122. data/lib/locomotive/wagon/generators/site/{foundation5.rb → foundation.rb} +8 -12
  123. data/lib/locomotive/wagon/generators/site.rb +1 -1
  124. data/lib/locomotive/wagon/version.rb +1 -1
  125. data/locomotivecms_wagon.gemspec +3 -2
  126. data/spec/fixtures/cassettes/authenticate.yml +38 -38
  127. data/spec/fixtures/cassettes/delete.yml +211 -211
  128. data/spec/fixtures/cassettes/push.yml +1333 -1374
  129. data/spec/integration/cli_spec.rb +1 -1
  130. data/spec/unit/decorators/content_entry_decorator_spec.rb +23 -0
  131. metadata +133 -104
  132. data/generators/foundation5/app/content_types/.empty_directory +0 -1
  133. data/generators/foundation5/app/views/pages/404.liquid +0 -10
  134. data/generators/foundation5/app/views/pages/index.liquid.haml +0 -157
  135. data/generators/foundation5/data/.empty_directory +0 -1
  136. data/generators/foundation5/icon.png +0 -0
  137. data/generators/foundation5/public/fonts/.empty_directory +0 -1
  138. data/generators/foundation5/public/images/.empty_directory +0 -1
  139. data/generators/foundation5/public/javascripts/foundation/foundation.abide.js +0 -299
  140. data/generators/foundation5/public/javascripts/foundation/foundation.accordion.js +0 -59
  141. data/generators/foundation5/public/javascripts/foundation/foundation.alert.js +0 -43
  142. data/generators/foundation5/public/javascripts/foundation/foundation.clearing.js +0 -534
  143. data/generators/foundation5/public/javascripts/foundation/foundation.dropdown.js +0 -311
  144. data/generators/foundation5/public/javascripts/foundation/foundation.equalizer.js +0 -74
  145. data/generators/foundation5/public/javascripts/foundation/foundation.interchange.js +0 -331
  146. data/generators/foundation5/public/javascripts/foundation/foundation.joyride.js +0 -843
  147. data/generators/foundation5/public/javascripts/foundation/foundation.js +0 -611
  148. data/generators/foundation5/public/javascripts/foundation/foundation.magellan.js +0 -178
  149. data/generators/foundation5/public/javascripts/foundation/foundation.offcanvas.js +0 -108
  150. data/generators/foundation5/public/javascripts/foundation/foundation.orbit.js +0 -610
  151. data/generators/foundation5/public/javascripts/foundation/foundation.reveal.js +0 -437
  152. data/generators/foundation5/public/javascripts/foundation/foundation.slider.js +0 -199
  153. data/generators/foundation5/public/javascripts/foundation/foundation.tab.js +0 -167
  154. data/generators/foundation5/public/javascripts/foundation/foundation.tooltip.js +0 -298
  155. data/generators/foundation5/public/javascripts/foundation/foundation.topbar.js +0 -425
  156. data/generators/foundation5/public/javascripts/foundation.js +0 -4161
  157. data/generators/foundation5/public/javascripts/foundation.min.js +0 -10
  158. data/generators/foundation5/public/javascripts/vendor/custom.modernizr.js +0 -4
  159. data/generators/foundation5/public/javascripts/vendor/custom.modernizr.min.js +0 -1
  160. data/generators/foundation5/public/javascripts/vendor/fastclick.js +0 -9
  161. data/generators/foundation5/public/javascripts/vendor/fastclick.min.js +0 -11
  162. data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.js +0 -645
  163. data/generators/foundation5/public/javascripts/vendor/jquery.autocomplete.min.js +0 -1
  164. data/generators/foundation5/public/javascripts/vendor/jquery.cookie.js +0 -8
  165. data/generators/foundation5/public/javascripts/vendor/jquery.cookie.min.js +0 -8
  166. data/generators/foundation5/public/javascripts/vendor/jquery.js +0 -26
  167. data/generators/foundation5/public/javascripts/vendor/jquery.min.js +0 -27
  168. data/generators/foundation5/public/javascripts/vendor/modernizr.js +0 -8
  169. data/generators/foundation5/public/javascripts/vendor/modernizr.min.js +0 -1
  170. data/generators/foundation5/public/javascripts/vendor/placeholder.js +0 -2
  171. data/generators/foundation5/public/javascripts/vendor/placeholder.min.js +0 -1
  172. data/generators/foundation5/public/samples/.empty_directory +0 -1
  173. data/generators/foundation5/public/stylesheets/application.css +0 -2
  174. data/generators/foundation5/public/stylesheets/application.css.scss +0 -3
  175. data/generators/foundation5/public/stylesheets/foundation/_functions.scss +0 -102
  176. data/generators/foundation5/public/stylesheets/foundation/_settings.scss +0 -1441
  177. data/generators/foundation5/public/stylesheets/foundation/components/_accordion.scss +0 -157
  178. data/generators/foundation5/public/stylesheets/foundation/components/_alert-boxes.scss +0 -128
  179. data/generators/foundation5/public/stylesheets/foundation/components/_block-grid.scss +0 -132
  180. data/generators/foundation5/public/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
  181. data/generators/foundation5/public/stylesheets/foundation/components/_button-groups.scss +0 -197
  182. data/generators/foundation5/public/stylesheets/foundation/components/_buttons.scss +0 -259
  183. data/generators/foundation5/public/stylesheets/foundation/components/_clearing.scss +0 -247
  184. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown-buttons.scss +0 -130
  185. data/generators/foundation5/public/stylesheets/foundation/components/_dropdown.scss +0 -262
  186. data/generators/foundation5/public/stylesheets/foundation/components/_flex-video.scss +0 -51
  187. data/generators/foundation5/public/stylesheets/foundation/components/_forms.scss +0 -585
  188. data/generators/foundation5/public/stylesheets/foundation/components/_global.scss +0 -460
  189. data/generators/foundation5/public/stylesheets/foundation/components/_grid.scss +0 -275
  190. data/generators/foundation5/public/stylesheets/foundation/components/_icon-bar.scss +0 -293
  191. data/generators/foundation5/public/stylesheets/foundation/components/_inline-lists.scss +0 -57
  192. data/generators/foundation5/public/stylesheets/foundation/components/_joyride.scss +0 -222
  193. data/generators/foundation5/public/stylesheets/foundation/components/_keystrokes.scss +0 -61
  194. data/generators/foundation5/public/stylesheets/foundation/components/_labels.scss +0 -106
  195. data/generators/foundation5/public/stylesheets/foundation/components/_magellan.scss +0 -34
  196. data/generators/foundation5/public/stylesheets/foundation/components/_offcanvas.scss +0 -513
  197. data/generators/foundation5/public/stylesheets/foundation/components/_orbit.scss +0 -368
  198. data/generators/foundation5/public/stylesheets/foundation/components/_pagination.scss +0 -162
  199. data/generators/foundation5/public/stylesheets/foundation/components/_panels.scss +0 -95
  200. data/generators/foundation5/public/stylesheets/foundation/components/_pricing-tables.scss +0 -150
  201. data/generators/foundation5/public/stylesheets/foundation/components/_progress-bars.scss +0 -79
  202. data/generators/foundation5/public/stylesheets/foundation/components/_range-slider.scss +0 -168
  203. data/generators/foundation5/public/stylesheets/foundation/components/_reveal.scss +0 -222
  204. data/generators/foundation5/public/stylesheets/foundation/components/_side-nav.scss +0 -116
  205. data/generators/foundation5/public/stylesheets/foundation/components/_split-buttons.scss +0 -191
  206. data/generators/foundation5/public/stylesheets/foundation/components/_sub-nav.scss +0 -123
  207. data/generators/foundation5/public/stylesheets/foundation/components/_switches.scss +0 -230
  208. data/generators/foundation5/public/stylesheets/foundation/components/_tables.scss +0 -135
  209. data/generators/foundation5/public/stylesheets/foundation/components/_tabs.scss +0 -123
  210. data/generators/foundation5/public/stylesheets/foundation/components/_thumbs.scss +0 -66
  211. data/generators/foundation5/public/stylesheets/foundation/components/_toolbar.scss +0 -70
  212. data/generators/foundation5/public/stylesheets/foundation/components/_tooltips.scss +0 -142
  213. data/generators/foundation5/public/stylesheets/foundation/components/_top-bar.scss +0 -685
  214. data/generators/foundation5/public/stylesheets/foundation/components/_type.scss +0 -525
  215. data/generators/foundation5/public/stylesheets/foundation/components/_visibility.scss +0 -408
  216. data/generators/foundation5/public/stylesheets/foundation.css +0 -6138
  217. data/generators/foundation5/public/stylesheets/foundation.css.scss +0 -45
  218. data/generators/foundation5/public/stylesheets/normalize.css +0 -357
  219. data/lib/locomotive/wagon/generators/site/foundation4.rb +0 -34
@@ -0,0 +1,264 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group button
7
+ ////
8
+
9
+ /// Padding inside buttons.
10
+ /// @type List
11
+ $button-padding: 0.85em 1em !default;
12
+
13
+ /// Margin around buttons.
14
+ /// @type List
15
+ $button-margin: 0 $global-margin $global-margin 0 !default;
16
+
17
+ /// Default fill for buttons. Can either be `solid` or `hollow`.
18
+ /// @type Keyword
19
+ $button-fill: solid !default;
20
+
21
+ /// Default background color for buttons.
22
+ /// @type Color
23
+ $button-background: $primary-color !default;
24
+
25
+ /// Background color on hover for buttons.
26
+ /// @type Color
27
+ $button-background-hover: scale-color($button-background, $lightness: -15%) !default;
28
+
29
+ /// Font color for buttons.
30
+ /// @type List
31
+ $button-color: #fff !default;
32
+
33
+ /// Font color for buttons, if the background is light.
34
+ /// @type List
35
+ $button-color-alt: #000 !default;
36
+
37
+ /// Border radius for buttons, defaulted to global-radius.
38
+ /// @type Number
39
+ $button-radius: $global-radius !default;
40
+
41
+ /// Sizes for buttons.
42
+ /// @type Map
43
+ $button-sizes: (
44
+ tiny: 0.6rem,
45
+ small: 0.75rem,
46
+ default: 0.9rem,
47
+ large: 1.25rem,
48
+ ) !default;
49
+
50
+ /// opacity for a disabled button.
51
+ /// @type List
52
+ $button-opacity-disabled: 0.25 !default;
53
+
54
+ // Internal: flip from margin-right to margin-left for defaults
55
+ @if $global-text-direction == 'rtl' {
56
+ $button-margin: 0 0 $global-margin $global-margin;
57
+ }
58
+
59
+ // TODO: Document button-base() mixin
60
+ @mixin button-base {
61
+ @include disable-mouse-outline;
62
+ display: inline-block;
63
+ text-align: center;
64
+ line-height: 1;
65
+ cursor: pointer;
66
+ -webkit-appearance: none;
67
+ transition: all 0.25s ease-out;
68
+ vertical-align: middle;
69
+ border: 1px solid transparent;
70
+ border-radius: $button-radius;
71
+ padding: $button-padding;
72
+ margin: $button-margin;
73
+ font-size: map-get($button-sizes, default);
74
+ }
75
+
76
+ /// Expands a button to make it full-width.
77
+ /// @param {Boolean} $expand [true] - Set to `true` to enable the expand behavior. Set to `false` to reverse this behavior.
78
+ @mixin button-expand($expand: true) {
79
+ @if $expand {
80
+ display: block;
81
+ width: 100%;
82
+ margin-left: 0;
83
+ margin-right: 0;
84
+ }
85
+ @else {
86
+ display: inline-block;
87
+ width: auto;
88
+ margin: $button-margin;
89
+ }
90
+ }
91
+
92
+ /// Sets the visual style of a button.
93
+ /// @param {Color} $background [$button-background] - Background color of the button.
94
+ /// @param {Color} $background-hover [$button-background-hover] - Background color of the button on hover. Set to `auto` to have the mixin automatically generate a hover color.
95
+ /// @param {Color} $color [$button-color] - Text color of the button. Set to `auto` to automatically generate a color based on the background color.
96
+ @mixin button-style(
97
+ $background: $button-background,
98
+ $background-hover: $button-background-hover,
99
+ $color: $button-color
100
+ ) {
101
+ @if $color == auto {
102
+ $color: isitlight($background);
103
+ }
104
+
105
+ @if $background-hover == auto {
106
+ $background-hover: scale-color($background, $lightness: -20%);
107
+ }
108
+
109
+ @if lightness($background) >= 70% {
110
+ $color: $button-color-alt;
111
+ }
112
+ @else {
113
+ $color: $button-color;
114
+ }
115
+
116
+ background: $background;
117
+ color: $color;
118
+
119
+ &:hover, &:focus {
120
+ background: $background-hover;
121
+ color: $color;
122
+ }
123
+ }
124
+
125
+ /// Removes background fill on hover and focus for hollow buttons.
126
+ @mixin button-hollow {
127
+ &,
128
+ &:hover, &:focus {
129
+ background: transparent;
130
+ }
131
+ }
132
+
133
+ @mixin button-hollow-style($color: $primary-color) {
134
+ $color-hover: scale-color($color, $lightness: -50%);
135
+
136
+ border: 1px solid $color;
137
+ color: $color;
138
+
139
+ &:hover, &:focus {
140
+ border-color: $color-hover;
141
+ color: $color-hover;
142
+ }
143
+ }
144
+
145
+ /// Adds disabled styles to a button by fading the element, reseting the cursor, and disabling pointer events.
146
+ @mixin button-disabled {
147
+ opacity: $button-opacity-disabled;
148
+ cursor: not-allowed;
149
+ pointer-events: none;
150
+ }
151
+
152
+ /// Adds a dropdown arrow to a button.
153
+ /// @param {Number} $size [0.4em] - Size of the arrow. We recommend using an `em` value so the triangle scales when used inside different sizes of buttons.
154
+ /// @param {Color} $color [white] - Color of the arrow.
155
+ /// @param {Number} $offset [$button-padding] - Distance between the arrow and the text of the button. Defaults to whatever the right padding of a button is.
156
+ @mixin button-dropdown(
157
+ $size: 0.4em,
158
+ $color: $white,
159
+ $offset: get-side($button-padding, right)
160
+ ) {
161
+ &::after {
162
+ @include css-triangle($size, $color, down);
163
+ position: relative;
164
+ top: 0.4em; // Aligns the arrow with the text of the button
165
+ float: #{$global-right};
166
+ margin-#{$global-left}: get-side($button-padding, right);
167
+ display: inline-block;
168
+ }
169
+ }
170
+
171
+ /// Adds all styles for a button. For more granular control over styles, use the individual button mixins.
172
+ /// @param {Boolean} $expand [false] - Set to `true` to make the button full-width.
173
+ /// @param {Color} $background [$button-background] - Background color of the button.
174
+ /// @param {Color} $background-hover [$button-background-hover] - Background color of the button on hover. Set to `auto` to have the mixin automatically generate a hover color.
175
+ /// @param {Color} $color [$button-color] - Text color of the button. Set to `auto` to automatically generate a color based on the background color.
176
+ /// @param {Keyword} $style [solid] - Set to `hollow` to create a hollow button. The color defined in `$background` will be used as the primary color of the button.
177
+ @mixin button(
178
+ $expand: false,
179
+ $background: $button-background,
180
+ $background-hover: $button-background-hover,
181
+ $color: $button-color,
182
+ $style: $button-fill
183
+ ) {
184
+ @include button-base;
185
+
186
+ @if $style == solid {
187
+ @include button-style($background, $background-hover, $color);
188
+ }
189
+ @else if $style == hollow {
190
+ @include button-hollow;
191
+ @include button-hollow-style($background);
192
+ }
193
+
194
+ @if $expand {
195
+ @include button-expand;
196
+ }
197
+ }
198
+
199
+ @mixin foundation-button {
200
+ .button {
201
+ @include button;
202
+
203
+ // Sizes
204
+ &.tiny { font-size: map-get($button-sizes, tiny); }
205
+ &.small { font-size: map-get($button-sizes, small); }
206
+ &.large { font-size: map-get($button-sizes, large); }
207
+ &.expanded { @include button-expand; }
208
+
209
+ // Colors
210
+ @each $name, $color in $foundation-colors {
211
+ @if $button-fill != hollow {
212
+ &.#{$name} {
213
+ @include button-style($color, auto);
214
+ }
215
+ }
216
+ @else {
217
+ &.#{$name} {
218
+ @include button-hollow-style($color);
219
+ }
220
+
221
+ &.#{$name}.dropdown::after {
222
+ border-top-color: $color;
223
+ }
224
+ }
225
+ }
226
+
227
+ // Hollow style
228
+ @if $button-fill != hollow {
229
+ &.hollow {
230
+ @include button-hollow;
231
+ @include button-hollow-style;
232
+
233
+ @each $name, $color in $foundation-colors {
234
+ &.#{$name} {
235
+ @include button-hollow-style($color);
236
+ }
237
+ }
238
+ }
239
+ }
240
+
241
+ // Disabled style
242
+ &.disabled {
243
+ @include button-disabled;
244
+ }
245
+
246
+ // Dropdown arrow
247
+ &.dropdown {
248
+ @include button-dropdown;
249
+
250
+ @if $button-fill == hollow {
251
+ &::after {
252
+ border-top-color: $button-background;
253
+ }
254
+ }
255
+ }
256
+
257
+ // Button with dropdown arrow only
258
+ &.arrow-only::after {
259
+ margin-#{$global-left}: 0;
260
+ float: none;
261
+ top: 0.2em;
262
+ }
263
+ }
264
+ }
@@ -0,0 +1,115 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group callout
7
+ ////
8
+
9
+ /// Defualt background color.
10
+ /// @type Color
11
+ $callout-background: $white !default;
12
+
13
+ /// Default fade value for callout backgrounds.
14
+ /// @type Number
15
+ $callout-background-fade: 85% !default;
16
+
17
+ /// Defualt border style for callouts.
18
+ /// @type List
19
+ $callout-border: 1px solid rgba($black, 0.25) !default;
20
+
21
+ /// Default bottom margin for callouts.
22
+ /// @type Number
23
+ $callout-margin: 0 0 1rem 0 !default;
24
+
25
+ /// Default inner padding for callouts.
26
+ /// @type Number
27
+ $callout-padding: 1rem !default;
28
+
29
+ /// Default font color for callouts.
30
+ /// @type Color
31
+ $callout-font-color: $body-font-color !default;
32
+
33
+ /// Default font color for callouts, if the callout has a dark background.
34
+ /// @type Color
35
+ $callout-font-color-alt: $body-background !default;
36
+
37
+ /// Default border radius for callouts.
38
+ /// @type Color
39
+ $callout-radius: $global-radius !default;
40
+
41
+ /// Amount to tint links used within colored panels. Set to `false` to disable this feature.
42
+ /// @type Number | Boolean
43
+ $callout-link-tint: 30%;
44
+
45
+ /// Adds basic styles for a callout, including padding and margin.
46
+ @mixin callout-base() {
47
+ margin: $callout-margin;
48
+ padding: $callout-padding;
49
+ border: $callout-border;
50
+ border-radius: $callout-radius;
51
+ position: relative;
52
+
53
+ // Respect the padding, fool.
54
+ > :first-child {
55
+ margin-top: 0;
56
+ }
57
+
58
+ > :last-child {
59
+ margin-bottom: 0;
60
+ }
61
+ }
62
+
63
+ /// Generate quick styles for a callout using a single color as a baseline. If `$callout-link-tint` is enabled, links within colored panels will be a darker version of the background.
64
+ /// @param {Color} $color [$callout-background] - Color to use.
65
+ @mixin callout-style($color: $callout-background) {
66
+ $background: scale-color($color, $lightness: $callout-background-fade);
67
+ $link-color: scale-color($color, $lightness: -$callout-link-tint);
68
+
69
+ background-color: $background;
70
+
71
+ @if $callout-link-tint and hue($background) > 0deg {
72
+ a {
73
+ color: $link-color;
74
+
75
+ &:hover {
76
+ color: darken($link-color, 15%);
77
+ }
78
+ }
79
+ }
80
+ }
81
+
82
+ @mixin callout-size($padding) {
83
+ padding-top: $padding;
84
+ padding-right: $padding;
85
+ padding-bottom: $padding;
86
+ padding-left: $padding;
87
+ }
88
+
89
+
90
+ /// Adds styles for a callout.
91
+ /// @param {Color} $color [$callout-background] - Color to use.
92
+ @mixin callout($color: $callout-background) {
93
+ @include callout-base;
94
+ @include callout-style($color);
95
+ }
96
+
97
+ @mixin foundation-callout {
98
+ .callout {
99
+ @include callout;
100
+
101
+ @each $name, $color in $foundation-colors {
102
+ &.#{$name} {
103
+ @include callout-style($color);
104
+ }
105
+ }
106
+
107
+ &.small {
108
+ @include callout-size(.5rem);
109
+ }
110
+
111
+ &.large {
112
+ @include callout-size(3rem);
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,61 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group close-button
7
+ ////
8
+
9
+ /// Default position of the close button. The first value should be `right` or `left`, and the second value should be `top` or `bottom`.
10
+ /// @type List
11
+ $closebutton-position: right top !default;
12
+
13
+ /// Right (or left) offset for a close button.
14
+ /// @type Number
15
+ $closebutton-offset-horizontal: 1rem !default;
16
+
17
+ /// Top (or bottom) offset for a close button.
18
+ /// @type Number
19
+ $closebutton-offset-vertical: 0.5rem !default;
20
+
21
+ /// Default font size of the close button.
22
+ /// @type Number
23
+ $closebutton-size: 2em !default;
24
+
25
+ /// The line-height of the close button. It affects the spacing of the element.
26
+ /// @type Number
27
+ $closebutton-lineheight: 1 !default;
28
+
29
+ /// Default color of the close button.
30
+ /// @type Color
31
+ $closebutton-color: $dark-gray !default;
32
+
33
+ /// Default color of the close button when being hovered on.
34
+ /// @type Color
35
+ $closebutton-color-hover: $black !default;
36
+
37
+ /// Adds styles for a close button, using the styles in the settings variables.
38
+ @mixin close-button {
39
+ $x: nth($closebutton-position, 1);
40
+ $y: nth($closebutton-position, 2);
41
+
42
+ @include disable-mouse-outline;
43
+ position: absolute;
44
+ color: $closebutton-color;
45
+ #{$x}: $closebutton-offset-horizontal;
46
+ #{$y}: $closebutton-offset-vertical;
47
+ font-size: $closebutton-size;
48
+ line-height: $closebutton-lineheight;
49
+ cursor: pointer;
50
+
51
+ &:hover,
52
+ &:focus {
53
+ color: $closebutton-color-hover;
54
+ }
55
+ }
56
+
57
+ @mixin foundation-close-button {
58
+ .close-button {
59
+ @include close-button;
60
+ }
61
+ }
@@ -0,0 +1,67 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group drilldown
7
+ ////
8
+
9
+ /// Transition property to use for animating menus.
10
+ /// @type Transition
11
+ $drilldown-transition: transform 0.15s linear !default;
12
+
13
+ /// Adds arrows to drilldown items with submenus, as well as the back button.
14
+ /// @type Boolean
15
+ $drilldown-arrows: true;
16
+
17
+ @mixin foundation-drilldown-menu {
18
+ // Applied to the Menu container
19
+ .is-drilldown {
20
+ position: relative;
21
+ overflow: hidden;
22
+ }
23
+
24
+ // Applied to nested <ul>s
25
+ .is-drilldown-sub {
26
+ position: absolute;
27
+ top: 0;
28
+ left: 100%;
29
+ z-index: -1;
30
+ height: 100%;
31
+ width: 100%;
32
+ background: $white;
33
+ transition: $drilldown-transition;
34
+
35
+ &.is-active {
36
+ z-index: 1;
37
+ display: block;
38
+ transform: translateX(-100%);
39
+ }
40
+
41
+ &.is-closing {
42
+ transform: translateX(100%);
43
+ }
44
+ }
45
+
46
+ @if $drilldown-arrows {
47
+ .is-drilldown-submenu-parent > a {
48
+ position: relative;
49
+
50
+ &::after {
51
+ @include css-triangle(6px, $primary-color, right);
52
+ position: absolute;
53
+ top: 50%;
54
+ margin-top: -6px;
55
+ right: 1rem;
56
+ }
57
+ }
58
+
59
+ .js-drilldown-back::before {
60
+ @include css-triangle(6px, $primary-color, left);
61
+ float: left;
62
+ margin-right: 0.75rem; // Creates space between the arrow and the text
63
+ margin-left: 0.6rem; // Lines the tip of the arrow with the items below
64
+ margin-top: 14px; // Aligns the arrow with the text
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,123 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group dropdown-menu
7
+ ////
8
+
9
+ /// Enables arrows for items with dropdown menus.
10
+ /// @type Boolean
11
+ $dropdownmenu-arrows: true !default;
12
+
13
+ /// Minimum width of dropdown sub-menus.
14
+ /// @type Length
15
+ $dropdownmenu-min-width: 200px !default;
16
+
17
+ /// Background color for dropdowns.
18
+ /// @type Color
19
+ $dropdownmenu-background: $white !default;
20
+
21
+ /// Border for dropdown panes.
22
+ /// @type List
23
+ $dropdown-border: 1px solid $medium-gray !default;
24
+
25
+ @mixin foundation-dropdown-menu {
26
+ .dropdown.menu {
27
+ .has-submenu {
28
+ position: relative;
29
+
30
+ a::after {
31
+ float: right;
32
+ margin-top: 3px;
33
+ margin-left: 10px;
34
+ }
35
+
36
+ @if $dropdownmenu-arrows {
37
+ &.is-down-arrow a {
38
+ padding-right: 1.5rem;
39
+ position: relative;
40
+ }
41
+ &.is-down-arrow > a::after {
42
+ @include css-triangle(5px, $anchor-color, down);
43
+ position: absolute;
44
+ top: 12px;
45
+ right: 5px;
46
+ }
47
+ &.is-left-arrow > a::after {
48
+ @include css-triangle(5px, $anchor-color, left);
49
+ float: left;
50
+ margin-left: 0;
51
+ margin-right: 10px;
52
+ }
53
+ &.is-right-arrow > a::after {
54
+ @include css-triangle(5px, $anchor-color, right);
55
+ }
56
+ }
57
+
58
+ &.is-left-arrow.opens-inner .submenu{
59
+ right: 0;
60
+ left: auto;
61
+ }
62
+ &.is-right-arrow.opens-inner .submenu{
63
+ left: 0;
64
+ right: auto;
65
+ }
66
+ &.opens-inner .submenu {
67
+ top: 100%;
68
+ }
69
+ }
70
+
71
+ .submenu {
72
+ display: none;
73
+ position: absolute;
74
+ top: 0;
75
+ left: 100%;
76
+ min-width: $dropdownmenu-min-width;
77
+ z-index: 1;
78
+ background: $dropdownmenu-background;
79
+ border: $dropdown-border;
80
+
81
+ > li {
82
+ width: 100%;
83
+ }
84
+
85
+ &.first-sub {
86
+ top: 100%;
87
+ left: 0;
88
+ right: auto;
89
+ }
90
+
91
+ &:not(.js-dropdown-nohover) > .has-submenu:hover > &,
92
+ &.js-dropdown-active {
93
+ display: block;
94
+ }
95
+ }
96
+
97
+ .has-submenu.opens-left .submenu {
98
+ left: auto;
99
+ right: 100%;
100
+ }
101
+
102
+ &.align-right {
103
+ .submenu.first-sub {
104
+ top: 100%;
105
+ left: auto;
106
+ right: 0;
107
+ }
108
+ }
109
+ }
110
+
111
+ .is-dropdown-menu.vertical {
112
+ width: 100px;
113
+
114
+ &.align-right {
115
+ float: right;
116
+ }
117
+
118
+ > li .submenu {
119
+ top: 0;
120
+ left: 100%;
121
+ }
122
+ }
123
+ }
@@ -0,0 +1,64 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group dropdown
7
+ ////
8
+
9
+ /// Padding for dropdown panes.
10
+ /// @type List
11
+ $dropdown-padding: 1rem !default;
12
+
13
+ /// Border for dropdown panes.
14
+ /// @type List
15
+ $dropdown-border: 1px solid $medium-gray !default;
16
+
17
+ /// Font size for dropdown panes.
18
+ /// @type List
19
+ $dropdown-font-size: 16rem !default;
20
+
21
+ /// Width for dropdown panes.
22
+ /// @type Number
23
+ $dropdown-width: 300px !default;
24
+
25
+ /// Border radius dropdown panes.
26
+ /// @type Number
27
+ $dropdown-radius: $global-radius !default;
28
+
29
+ /// Sizes for dropdown panes. Each size is a CSS class you can apply.
30
+ /// @type Map
31
+ $dropdown-sizes: (
32
+ tiny: 100px,
33
+ small: 200px,
34
+ large: 400px,
35
+ ) !default;
36
+
37
+ /// Applies styles for a basic dropdown.
38
+ @mixin dropdown-container {
39
+ background-color: $body-background;
40
+ border: $dropdown-border;
41
+ display: block;
42
+ padding: $dropdown-padding;
43
+ position: absolute;
44
+ visibility: hidden;
45
+ width: 300px;
46
+ z-index: 10;
47
+ border-radius: $dropdown-radius;
48
+
49
+ &.is-open {
50
+ visibility: visible;
51
+ }
52
+ }
53
+
54
+ @mixin foundation-dropdown {
55
+ .dropdown-pane {
56
+ @include dropdown-container;
57
+ }
58
+
59
+ @each $name, $size in $dropdown-sizes {
60
+ .dropdown-pane.#{$name} {
61
+ width: $size;
62
+ }
63
+ }
64
+ }