locomotivecms_wagon 2.4.0.rc2 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/generators/foundation/public/javascripts/vendor/foundation.js +10839 -6523
  3. data/generators/foundation/public/javascripts/vendor/foundation.min.js +5 -3
  4. data/generators/foundation/public/stylesheets/_settings.scss +455 -115
  5. data/generators/foundation/public/stylesheets/app.css +0 -3
  6. data/generators/foundation/public/stylesheets/app.scss +15 -6
  7. data/generators/foundation/public/stylesheets/foundation.css +4191 -1885
  8. data/generators/foundation/public/stylesheets/foundation6/_global.scss +106 -54
  9. data/generators/foundation/public/stylesheets/foundation6/components/_accordion-menu.scss +157 -14
  10. data/generators/foundation/public/stylesheets/foundation6/components/_accordion.scss +71 -28
  11. data/generators/foundation/public/stylesheets/foundation6/components/_badge.scss +17 -9
  12. data/generators/foundation/public/stylesheets/foundation6/components/_breadcrumbs.scss +33 -10
  13. data/generators/foundation/public/stylesheets/foundation6/components/_button-group.scss +168 -30
  14. data/generators/foundation/public/stylesheets/foundation6/components/_button.scss +165 -44
  15. data/generators/foundation/public/stylesheets/foundation6/components/_callout.scss +9 -18
  16. data/generators/foundation/public/stylesheets/foundation6/components/_card.scss +129 -0
  17. data/generators/foundation/public/stylesheets/foundation6/components/_close-button.scss +54 -13
  18. data/generators/foundation/public/stylesheets/foundation6/components/_drilldown.scss +108 -33
  19. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown-menu.scss +215 -64
  20. data/generators/foundation/public/stylesheets/foundation6/components/_dropdown.scss +22 -7
  21. data/generators/foundation/public/stylesheets/foundation6/components/_flex-video.scss +1 -68
  22. data/generators/foundation/public/stylesheets/foundation6/components/_flex.scss +117 -0
  23. data/generators/foundation/public/stylesheets/foundation6/components/_float.scss +1 -1
  24. data/generators/foundation/public/stylesheets/foundation6/components/_label.scss +16 -8
  25. data/generators/foundation/public/stylesheets/foundation6/components/_media-object.scss +50 -10
  26. data/generators/foundation/public/stylesheets/foundation6/components/_menu-icon.scss +9 -0
  27. data/generators/foundation/public/stylesheets/foundation6/components/_menu.scss +373 -91
  28. data/generators/foundation/public/stylesheets/foundation6/components/_off-canvas.scss +418 -83
  29. data/generators/foundation/public/stylesheets/foundation6/components/_orbit.scss +17 -7
  30. data/generators/foundation/public/stylesheets/foundation6/components/_pagination.scss +77 -45
  31. data/generators/foundation/public/stylesheets/foundation6/components/_progress-bar.scss +16 -35
  32. data/generators/foundation/public/stylesheets/foundation6/components/_responsive-embed.scss +70 -0
  33. data/generators/foundation/public/stylesheets/foundation6/components/_reveal.scss +59 -34
  34. data/generators/foundation/public/stylesheets/foundation6/components/_slider.scss +17 -38
  35. data/generators/foundation/public/stylesheets/foundation6/components/_sticky.scss +5 -4
  36. data/generators/foundation/public/stylesheets/foundation6/components/_switch.scss +52 -36
  37. data/generators/foundation/public/stylesheets/foundation6/components/_table.scss +197 -79
  38. data/generators/foundation/public/stylesheets/foundation6/components/_tabs.scss +126 -67
  39. data/generators/foundation/public/stylesheets/foundation6/components/_thumbnail.scss +17 -4
  40. data/generators/foundation/public/stylesheets/foundation6/components/_title-bar.scss +61 -21
  41. data/generators/foundation/public/stylesheets/foundation6/components/_tooltip.scss +74 -24
  42. data/generators/foundation/public/stylesheets/foundation6/components/_top-bar.scss +128 -10
  43. data/generators/foundation/public/stylesheets/foundation6/components/_visibility.scss +6 -5
  44. data/generators/foundation/public/stylesheets/foundation6/forms/_checkbox.scss +14 -9
  45. data/generators/foundation/public/stylesheets/foundation6/forms/_error.scss +12 -5
  46. data/generators/foundation/public/stylesheets/foundation6/forms/_fieldset.scss +6 -6
  47. data/generators/foundation/public/stylesheets/foundation6/forms/_forms.scss +11 -9
  48. data/generators/foundation/public/stylesheets/foundation6/forms/_help-text.scss +1 -1
  49. data/generators/foundation/public/stylesheets/foundation6/forms/_input-group.scss +82 -10
  50. data/generators/foundation/public/stylesheets/foundation6/forms/_label.scss +2 -0
  51. data/generators/foundation/public/stylesheets/foundation6/forms/_meter.scss +116 -0
  52. data/generators/foundation/public/stylesheets/foundation6/forms/_progress.scss +94 -0
  53. data/generators/foundation/public/stylesheets/foundation6/forms/_range.scss +149 -0
  54. data/generators/foundation/public/stylesheets/foundation6/forms/_select.scss +36 -14
  55. data/generators/foundation/public/stylesheets/foundation6/forms/_text.scss +53 -27
  56. data/generators/foundation/public/stylesheets/foundation6/foundation.scss +59 -17
  57. data/generators/foundation/public/stylesheets/foundation6/grid/_classes.scss +100 -56
  58. data/generators/foundation/public/stylesheets/foundation6/grid/_column.scss +22 -22
  59. data/generators/foundation/public/stylesheets/foundation6/grid/_flex-grid.scss +164 -96
  60. data/generators/foundation/public/stylesheets/foundation6/grid/_grid.scss +19 -4
  61. data/generators/foundation/public/stylesheets/foundation6/grid/_gutter.scss +61 -10
  62. data/generators/foundation/public/stylesheets/foundation6/grid/_layout.scss +49 -5
  63. data/generators/foundation/public/stylesheets/foundation6/grid/_position.scss +14 -9
  64. data/generators/foundation/public/stylesheets/foundation6/grid/_row.scss +42 -15
  65. data/generators/foundation/public/stylesheets/foundation6/motion-ui/_classes.scss +11 -4
  66. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_fade.scss +4 -1
  67. data/generators/foundation/public/stylesheets/foundation6/motion-ui/effects/_zoom.scss +1 -1
  68. data/generators/foundation/public/stylesheets/foundation6/motion-ui/transitions/_slide.scss +1 -1
  69. data/generators/foundation/public/stylesheets/foundation6/motion-ui/util/_transition.scss +1 -1
  70. data/generators/foundation/public/stylesheets/foundation6/prototype/_arrow.scss +36 -0
  71. data/generators/foundation/public/stylesheets/foundation6/prototype/_border-box.scss +35 -0
  72. data/generators/foundation/public/stylesheets/foundation6/prototype/_border-none.scss +35 -0
  73. data/generators/foundation/public/stylesheets/foundation6/prototype/_bordered.scss +54 -0
  74. data/generators/foundation/public/stylesheets/foundation6/prototype/_box.scss +23 -0
  75. data/generators/foundation/public/stylesheets/foundation6/prototype/_display.scss +50 -0
  76. data/generators/foundation/public/stylesheets/foundation6/prototype/_font-styling.scss +95 -0
  77. data/generators/foundation/public/stylesheets/foundation6/prototype/_list-style-type.scss +95 -0
  78. data/generators/foundation/public/stylesheets/foundation6/prototype/_overflow.scss +72 -0
  79. data/generators/foundation/public/stylesheets/foundation6/prototype/_position.scss +114 -0
  80. data/generators/foundation/public/stylesheets/foundation6/prototype/_prototype.scss +87 -0
  81. data/generators/foundation/public/stylesheets/foundation6/prototype/_relation.scss +157 -0
  82. data/generators/foundation/public/stylesheets/foundation6/prototype/_rotate.scss +31 -0
  83. data/generators/foundation/public/stylesheets/foundation6/prototype/_rounded.scss +54 -0
  84. data/generators/foundation/public/stylesheets/foundation6/prototype/_separator.scss +96 -0
  85. data/generators/foundation/public/stylesheets/foundation6/prototype/_shadow.scss +43 -0
  86. data/generators/foundation/public/stylesheets/foundation6/prototype/_sizing.scss +73 -0
  87. data/generators/foundation/public/stylesheets/foundation6/prototype/_spacing.scss +204 -0
  88. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-decoration.scss +48 -0
  89. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-transformation.scss +48 -0
  90. data/generators/foundation/public/stylesheets/foundation6/prototype/_text-utilities.scss +88 -0
  91. data/generators/foundation/public/stylesheets/foundation6/settings/_settings.scss +454 -116
  92. data/generators/foundation/public/stylesheets/foundation6/typography/_alignment.scss +9 -8
  93. data/generators/foundation/public/stylesheets/foundation6/typography/_base.scss +128 -55
  94. data/generators/foundation/public/stylesheets/foundation6/typography/_helpers.scss +7 -4
  95. data/generators/foundation/public/stylesheets/foundation6/typography/_print.scss +22 -9
  96. data/generators/foundation/public/stylesheets/foundation6/typography/_typography.scss +0 -2
  97. data/generators/foundation/public/stylesheets/foundation6/util/_breakpoint.scss +213 -47
  98. data/generators/foundation/public/stylesheets/foundation6/util/_color.scss +105 -17
  99. data/generators/foundation/public/stylesheets/foundation6/util/_direction.scss +31 -0
  100. data/generators/foundation/public/stylesheets/foundation6/util/_flex.scss +85 -0
  101. data/generators/foundation/public/stylesheets/foundation6/util/_math.scss +72 -0
  102. data/generators/foundation/public/stylesheets/foundation6/util/_mixins.scss +161 -38
  103. data/generators/foundation/public/stylesheets/foundation6/util/_selector.scss +5 -3
  104. data/generators/foundation/public/stylesheets/foundation6/util/_typography.scss +26 -0
  105. data/generators/foundation/public/stylesheets/foundation6/util/_unit.scss +100 -17
  106. data/generators/foundation/public/stylesheets/foundation6/util/_util.scss +4 -5
  107. data/generators/foundation/public/stylesheets/foundation6/util/_value.scss +68 -25
  108. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/_normalize.scss +3 -0
  109. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
  110. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
  111. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
  112. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
  113. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
  114. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
  115. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
  116. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
  117. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
  118. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
  119. data/generators/foundation/public/stylesheets/foundation6/vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
  120. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_cell.scss +169 -0
  121. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_classes.scss +476 -0
  122. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_collapse.scss +74 -0
  123. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_frame.scss +85 -0
  124. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_grid.scss +35 -0
  125. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_gutters.scss +45 -0
  126. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_layout.scss +33 -0
  127. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_position.scss +28 -0
  128. data/generators/foundation/public/stylesheets/foundation6/xy-grid/_xy-grid.scss +51 -0
  129. data/lib/locomotive/wagon/tools/styled_yaml.rb +1 -1
  130. data/lib/locomotive/wagon/version.rb +1 -1
  131. data/locomotivecms_wagon.gemspec +2 -2
  132. data/spec/fixtures/cassettes/authenticate.yml +102 -48
  133. data/spec/fixtures/cassettes/delete.yml +519 -259
  134. data/spec/fixtures/cassettes/push.yml +2724 -1486
  135. metadata +61 -10
  136. data/generators/foundation/public/stylesheets/foundation6/motion-ui.scss +0 -4
  137. data/generators/foundation/public/stylesheets/foundation6/vendor/normalize.scss +0 -424
@@ -2,41 +2,33 @@
2
2
  // foundation.zurb.com
3
3
  // Licensed under MIT Open Source
4
4
 
5
+ // sass-lint:disable force-attribute-nesting, force-pseudo-nesting, no-color-literals, no-qualifying-elements
6
+
5
7
  ////
6
8
  /// @group global
7
9
  ////
8
10
 
9
- /// Global width of your site. Used by the grid to determine row width.
10
- /// @type Number
11
- $global-width: rem-calc(1200) !default;
12
-
13
11
  /// Font size attribute applied to `<html>` and `<body>`. We use 100% by default so the value is inherited from the user's browser settings.
14
12
  /// @type Number
15
13
  $global-font-size: 100% !default;
16
14
 
15
+ /// Global width of your site. Used by the grid to determine row width.
16
+ /// @type Number
17
+ $global-width: rem-calc(1200) !default;
18
+
17
19
  /// Default line height for all type. `$global-lineheight` is 24px while `$global-font-size` is 16px
18
20
  /// @type Number
19
21
  $global-lineheight: 1.5 !default;
20
22
 
21
- /// Primary color for interactive components like links and buttons.
22
- /// @type Color
23
- $primary-color: #2199e8 !default;
24
-
25
- /// Secondary color, used with components that support the `.secondary` class.
26
- /// @type Color
27
- $secondary-color: #777 !default;
28
-
29
- /// Color to indicate a positive status or action, used with the `.success` class.
30
- /// @type Color
31
- $success-color: #3adb76 !default;
32
-
33
- /// Color to indicate a caution status or action, used with the `.warning` class.
34
- /// @type Color
35
- $warning-color: #ffae00 !default;
36
-
37
- /// Color to indicate a negative status or action, used with the `.alert` class.
38
- /// @type Color
39
- $alert-color: #ec5840 !default;
23
+ /// Colors used for buttons, callouts, links, etc. There must always be a color called `primary`.
24
+ /// @type Map
25
+ $foundation-palette: (
26
+ primary: #1779ba,
27
+ secondary: #767676,
28
+ success: #3adb76,
29
+ warning: #ffae00,
30
+ alert: #cc4b37,
31
+ ) !default;
40
32
 
41
33
  /// Color used for light gray UI items.
42
34
  /// @type Color
@@ -68,16 +60,12 @@ $body-font-color: $black !default;
68
60
 
69
61
  /// Font stack of the body.
70
62
  /// @type List
71
- $body-font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif !default;
63
+ $body-font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif !default;
72
64
 
73
65
  /// Set to `true` to enable antialiased type, using the `-webkit-font-smoothing` and `-moz-osx-font-smoothing` CSS properties.
74
66
  /// @type Boolean
75
67
  $body-antialiased: true !default;
76
68
 
77
- /// Text direction for the document. Set to `rtl` to reverse the orientation and direction of all components.
78
- /// @type Keyword
79
- $text-direction: ltr !default;
80
-
81
69
  /// Global value used for margin on components.
82
70
  /// @type Number
83
71
  $global-margin: 1rem !default;
@@ -86,9 +74,9 @@ $global-margin: 1rem !default;
86
74
  /// @type Number
87
75
  $global-padding: 1rem !default;
88
76
 
89
- /// Global value used for margin between components.
77
+ /// Global value used for positioning on components.
90
78
  /// @type Number
91
- $global-margin: 1rem !default;
79
+ $global-position: 1rem !default;
92
80
 
93
81
  /// Global font weight used for normal type.
94
82
  /// @type Keyword | Number
@@ -102,45 +90,79 @@ $global-weight-bold: bold !default;
102
90
  /// @type Number
103
91
  $global-radius: 0 !default;
104
92
 
93
+ /// Global value used for all menu styles. Can be overwritten at individual menu component level.
94
+ /// @type Number
95
+ $global-menu-padding: 0.7rem 1rem !default;
96
+
97
+ /// Global value used for all menu styles. Nested margin for submenu.
98
+ $global-menu-nested-margin: 1rem !default;
99
+
105
100
  /// Sets the text direction of the CSS. Can be either `ltr` or `rtl`.
101
+ /// @type Keyword
106
102
  $global-text-direction: ltr !default;
107
103
 
104
+ /// Enables flexbox for components that support it.
105
+ /// @type Boolean
106
+ $global-flexbox: true !default;
107
+
108
+ /// Enabled responsive breakpoints for prototypes if applicable
109
+ /// @type Boolean
110
+ $global-prototype-breakpoints: false !default;
111
+
112
+ /// Button cursor's value, `auto` by default
113
+ /// @type Keyword
114
+ $global-button-cursor: auto !default;
115
+
116
+ @if not map-has-key($foundation-palette, primary) {
117
+ @error 'In $foundation-palette, you must have a color named "primary".';
118
+ }
119
+
108
120
  // Internal variables used for text direction
109
121
  $global-left: if($global-text-direction == rtl, right, left);
110
122
  $global-right: if($global-text-direction == rtl, left, right);
111
123
 
112
- // Internal map used to iterate through colors, to generate CSS classes with less code
113
- $foundation-colors: (
114
- primary: $primary-color,
115
- secondary: $secondary-color,
116
- success: $success-color,
117
- alert: $alert-color,
118
- warning: $warning-color,
119
- );
124
+ /// Global tolerance for color pick contrast.
125
+ /// @type Number
126
+ $global-color-pick-contrast-tolerance: 0 !default;
127
+
128
+ // Internal variables used for colors
129
+ $primary-color: get-color(primary);
130
+ $secondary-color: get-color(secondary);
131
+ $success-color: get-color(success);
132
+ $warning-color: get-color(warning);
133
+ $alert-color: get-color(alert);
120
134
 
121
135
  @mixin foundation-global-styles {
122
- html,
123
- body {
124
- font-size: $global-font-size;
136
+ @include -zf-normalize;
137
+
138
+ // These styles are applied to a <meta> tag, which is read by the Foundation JavaScript
139
+ .foundation-mq {
140
+ font-family: '#{-zf-bp-serialize($breakpoints)}';
141
+ }
142
+
143
+ html {
125
144
  box-sizing: border-box;
145
+ font-size: $global-font-size;
126
146
  }
127
147
 
128
148
  // Set box-sizing globally to handle padding and border widths
129
149
  *,
130
- *:before,
131
- *:after {
150
+ *::before,
151
+ *::after {
132
152
  box-sizing: inherit;
133
153
  }
134
154
 
135
155
  // Default body styles
136
156
  body {
137
- padding: 0;
138
157
  margin: 0;
158
+ padding: 0;
159
+
160
+ background: $body-background;
161
+
139
162
  font-family: $body-font-family;
140
163
  font-weight: $global-weight-normal;
141
164
  line-height: $global-lineheight;
142
165
  color: $body-font-color;
143
- background: $body-background;
144
166
 
145
167
  @if ($body-antialiased) {
146
168
  -webkit-font-smoothing: antialiased;
@@ -149,14 +171,14 @@ $foundation-colors: (
149
171
  }
150
172
 
151
173
  img {
174
+ // Get rid of gap under images by making them display: inline-block; by default
175
+ display: inline-block;
176
+ vertical-align: middle;
177
+
152
178
  // Grid defaults to get images and embeds to work properly
153
179
  max-width: 100%;
154
180
  height: auto;
155
181
  -ms-interpolation-mode: bicubic;
156
-
157
- // Get rid of gap under images by making them display: inline-block; by default
158
- display: inline-block;
159
- vertical-align: middle;
160
182
  }
161
183
 
162
184
  // Make sure textarea takes on height automatically
@@ -168,13 +190,13 @@ $foundation-colors: (
168
190
 
169
191
  // Make select elements are 100% width by default
170
192
  select {
193
+ box-sizing: border-box;
171
194
  width: 100%;
172
195
  border-radius: $global-radius;
173
196
  }
174
197
 
175
198
  // Styles Google Maps and MapQuest embeds properly
176
- // scss-lint:disable IdSelector
177
- #map_canvas,
199
+ // sass-lint:disable-line no-ids
178
200
  .map_canvas,
179
201
  .mqa-display {
180
202
  img,
@@ -186,12 +208,42 @@ $foundation-colors: (
186
208
 
187
209
  // Reset <button> styles created by most browsers
188
210
  button {
189
- -webkit-appearance: none;
190
- -moz-appearance: none;
191
- background: transparent;
211
+ @include disable-mouse-outline;
192
212
  padding: 0;
213
+ appearance: none;
193
214
  border: 0;
194
215
  border-radius: $global-radius;
216
+ background: transparent;
195
217
  line-height: 1;
218
+ cursor: $global-button-cursor;
219
+ }
220
+
221
+ // Prevent text overflow on pre
222
+ pre {
223
+ overflow: auto;
196
224
  }
225
+
226
+ // Make reset inherit font-family instead of settings sans-serif
227
+ button,
228
+ input,
229
+ optgroup,
230
+ select,
231
+ textarea {
232
+ font-family: inherit;
233
+ }
234
+
235
+ // Internal classes to show/hide elements in JavaScript
236
+ .is-visible {
237
+ display: block !important;
238
+ }
239
+
240
+ .is-hidden {
241
+ display: none !important;
242
+ }
243
+ }
244
+
245
+ /// Loads normalize.css.
246
+ /// @access private
247
+ @mixin -zf-normalize {
248
+ @include normalize();
197
249
  }
@@ -2,27 +2,170 @@
2
2
  /// @group accordion-menu
3
3
  ////
4
4
 
5
+ /// Sets accordion menu padding.
6
+ /// @type Number
7
+ $accordionmenu-padding: $global-menu-padding !default;
8
+
9
+ /// Sets accordion menu nested margin
10
+ /// @type Number
11
+ $accordionmenu-nested-margin: $global-menu-nested-margin !default;
12
+
13
+ /// Sets accordion menu submenu padding.
14
+ /// @type Number
15
+ $accordionmenu-submenu-padding: $accordionmenu-padding !default;
16
+
5
17
  /// Sets if accordion menus have the default arrow styles.
6
18
  /// @type Boolean
7
- $accordionmenu-arrows: true;
19
+ $accordionmenu-arrows: true !default;
20
+
21
+ /// Sets accordion menu arrow color if arrow is used.
22
+ /// @type Color
23
+ $accordionmenu-arrow-color: $primary-color !default;
24
+
25
+ /// Sets accordion menu item padding.
26
+ /// @type Color
27
+ $accordionmenu-item-background: null !default;
28
+
29
+ /// Sets accordion menu item border.
30
+ /// @type Color
31
+ $accordionmenu-border: null !default;
32
+
33
+ /// Sets accordion menu item padding.
34
+ /// @type Color
35
+ $accordionmenu-submenu-toggle-background: null !default;
8
36
 
37
+ /// Sets accordion menu item padding.
38
+ /// @type List
39
+ $accordion-submenu-toggle-border: $accordionmenu-border !default;
40
+
41
+ /// Sets accordion menu submenu toggle background width.
42
+ /// @type Number
43
+ $accordionmenu-submenu-toggle-width: 40px !default;
44
+
45
+ /// Sets accordion menu submenu toggle background height.
46
+ /// @type Number
47
+ $accordionmenu-submenu-toggle-height: $accordionmenu-submenu-toggle-width !default;
48
+
49
+ /// Sets accordion menu arrow size if arrow is used.
50
+ /// @type Length
51
+ $accordionmenu-arrow-size: 6px !default;
52
+
53
+ @mixin zf-accordion-menu-left-right-arrows {
54
+ .is-accordion-submenu-parent:not(.has-submenu-toggle) > a {
55
+ position: relative;
56
+
57
+ &::after {
58
+ @include css-triangle($accordionmenu-arrow-size, $accordionmenu-arrow-color, down);
59
+ position: absolute;
60
+ top: 50%;
61
+ margin-top: -1 * ($accordionmenu-arrow-size / 2);
62
+ #{$global-right}: 1rem;
63
+ }
64
+ }
65
+ &.align-left .is-accordion-submenu-parent > a::after {
66
+ left: auto;
67
+ right: 1rem;
68
+ }
69
+ &.align-right .is-accordion-submenu-parent > a::after {
70
+ right: auto;
71
+ left: 1rem;
72
+ }
73
+ }
9
74
  @mixin foundation-accordion-menu {
10
- @if $accordionmenu-arrows {
11
- .is-accordion-submenu-parent > a {
12
- position: relative;
13
-
14
- &::after {
15
- @include css-triangle(6px, $primary-color, down);
16
- position: absolute;
17
- top: 50%;
18
- margin-top: -4px;
19
- right: 1rem;
75
+
76
+ .accordion-menu {
77
+ @if $accordionmenu-border {
78
+ border-bottom: $accordionmenu-border;
79
+ }
80
+
81
+ li {
82
+ @if $accordionmenu-border {
83
+ border-top: $accordionmenu-border;
84
+ border-right: $accordionmenu-border;
85
+ border-left: $accordionmenu-border;
20
86
  }
87
+ width: 100%;
21
88
  }
22
89
 
23
- .is-accordion-submenu-parent[aria-expanded="true"] > a::after {
24
- transform-origin: 50% 50%;
25
- transform: scaleY(-1);
90
+ a {
91
+ @if $accordionmenu-item-background {
92
+ background: $accordionmenu-item-background;
93
+ }
94
+ padding: $accordionmenu-padding;
95
+ }
96
+
97
+ .is-accordion-submenu a {
98
+ padding: $accordionmenu-submenu-padding;
99
+ }
100
+
101
+ .nested.is-accordion-submenu {
102
+ @include menu-nested($accordionmenu-nested-margin);
26
103
  }
104
+
105
+ &.align-#{$global-right} {
106
+ .nested.is-accordion-submenu {
107
+ @include menu-nested($accordionmenu-nested-margin, right);
108
+ }
109
+ }
110
+
111
+ @if $accordionmenu-arrows {
112
+ @include zf-accordion-menu-left-right-arrows;
113
+
114
+ .is-accordion-submenu-parent[aria-expanded='true'] > a::after {
115
+ transform: rotate(180deg);
116
+ transform-origin: 50% 50%;
117
+ }
118
+ }
119
+ }
120
+
121
+ .is-accordion-submenu li {
122
+ @if $accordionmenu-border {
123
+ border-right: 0;
124
+ border-left: 0;
125
+ }
126
+ }
127
+
128
+ .is-accordion-submenu-parent {
129
+ position: relative;
130
+ }
131
+
132
+ .has-submenu-toggle > a {
133
+ margin-#{$global-right}: $accordionmenu-submenu-toggle-width;
134
+ }
135
+
136
+ // Submenu toggle
137
+ .submenu-toggle {
138
+ position: absolute;
139
+ top: 0;
140
+ #{$global-right}: 0;
141
+ cursor: pointer;
142
+
143
+ width: $accordionmenu-submenu-toggle-width;
144
+ height: $accordionmenu-submenu-toggle-height;
145
+
146
+ border-#{$global-left}: $accordion-submenu-toggle-border;
147
+
148
+ @if $accordionmenu-submenu-toggle-background {
149
+ background: $accordionmenu-submenu-toggle-background;
150
+ }
151
+
152
+ // Add the arrow to the toggle
153
+ &::after {
154
+ @include css-triangle(6px, $accordionmenu-arrow-color, down);
155
+
156
+ top: 0;
157
+ bottom: 0;
158
+ margin: auto;
159
+ }
160
+ }
161
+
162
+ // Rotate the arrow when menu is open
163
+ .submenu-toggle[aria-expanded='true']::after {
164
+ transform: scaleY(-1);
165
+ transform-origin: 50% 50%;
166
+ }
167
+
168
+ .submenu-toggle-text {
169
+ @include element-invisible;
27
170
  }
28
171
  }
@@ -8,15 +8,19 @@
8
8
 
9
9
  /// Default background color of an accordion group.
10
10
  /// @type Color
11
- $accordion-background: $white;
11
+ $accordion-background: $white !default;
12
12
 
13
13
  /// If `true`, adds plus and minus icons to the side of each accordion title.
14
14
  /// @type Boolean
15
- $accordion-plusminus: true;
15
+ $accordion-plusminus: true !default;
16
+
17
+ /// Font size of accordion titles.
18
+ /// @type Number
19
+ $accordion-title-font-size: rem-calc(12) !default;
16
20
 
17
21
  /// Default text color for items in a Menu.
18
22
  /// @type Color
19
- $accordion-item-color: foreground($accordion-background, $primary-color);
23
+ $accordion-item-color: $primary-color !default;
20
24
 
21
25
  /// Default background color on hover for items in a Menu.
22
26
  /// @type Color
@@ -36,61 +40,100 @@ $accordion-content-border: 1px solid $light-gray !default;
36
40
 
37
41
  /// Default text color of tab content.
38
42
  /// @type Color
39
- $accordion-content-color: foreground($accordion-background, $primary-color);
43
+ $accordion-content-color: $body-font-color !default;
40
44
 
41
45
  /// Default padding for tab content.
42
46
  /// @type Number | List
43
47
  $accordion-content-padding: 1rem !default;
44
48
 
45
49
  /// Adds styles for an accordion container. Apply this to the same element that gets `data-accordion`.
46
- @mixin accordion-container {
47
- list-style-type: none;
48
- background: $accordion-background;
49
- border: $accordion-content-border;
50
- border-radius: $global-radius;
50
+ @mixin accordion-container (
51
+ $background: $accordion-background
52
+ ) {
51
53
  margin-#{$global-left}: 0;
54
+ background: $background;
55
+ list-style-type: none;
56
+ &[disabled] {
57
+ .accordion-title {
58
+ cursor: not-allowed;
59
+ }
60
+ }
61
+ }
62
+
63
+ /// Adds styles for the accordion item. Apply this to the list item within an accordion ul.
64
+ @mixin accordion-item {
65
+ &:first-child > :first-child {
66
+ border-radius: $global-radius $global-radius 0 0;
67
+ }
68
+
69
+ &:last-child > :last-child {
70
+ border-radius: 0 0 $global-radius $global-radius;
71
+ }
52
72
  }
53
73
 
54
74
  /// Adds styles for the title of an accordion item. Apply this to the link within an accordion item.
55
- @mixin accordion-title {
75
+ @mixin accordion-title (
76
+ $padding: $accordion-item-padding,
77
+ $font-size: $accordion-title-font-size,
78
+ $color: $accordion-item-color,
79
+ $border: $accordion-content-border,
80
+ $background-hover: $accordion-item-background-hover
81
+ ) {
82
+ position: relative;
56
83
  display: block;
57
- padding: $accordion-item-padding;
84
+ padding: $padding;
85
+
86
+ border: $border;
87
+ border-bottom: 0;
88
+
89
+ font-size: $font-size;
58
90
  line-height: 1;
59
- font-size: rem-calc(12);
60
- color: $accordion-item-color;
61
- position: relative;
62
- border-bottom: $accordion-content-border;
91
+ color: $color;
63
92
 
64
- &:hover,
65
- &:focus {
66
- background-color: $accordion-item-background-hover;
93
+ :last-child:not(.is-active) > & {
94
+ border-bottom: $border;
95
+ border-radius: 0 0 $global-radius $global-radius;
67
96
  }
68
97
 
69
- // Remove the border on the last title
70
- :last-child > & {
71
- border-bottom-width: 0;
98
+ &:hover,
99
+ &:focus {
100
+ background-color: $background-hover;
72
101
  }
73
102
 
74
103
  @if $accordion-plusminus {
75
104
  &::before {
76
- content: '+';
77
105
  position: absolute;
78
- #{$global-right}: 1rem;
79
106
  top: 50%;
107
+ #{$global-right}: 1rem;
80
108
  margin-top: -0.5rem;
109
+ content: '+';
81
110
  }
82
111
 
83
112
  .is-active > &::before {
84
- content: '';
113
+ content: '\2013';
85
114
  }
86
115
  }
87
116
  }
88
117
 
89
118
  /// Adds styles for accordion content. Apply this to the content pane below an accordion item's title.
90
- @mixin accordion-content {
91
- padding: $accordion-item-padding;
119
+ @mixin accordion-content (
120
+ $padding: $accordion-content-padding,
121
+ $border: $accordion-content-border,
122
+ $background: $accordion-content-background,
123
+ $color: $accordion-content-color
124
+ ) {
92
125
  display: none;
93
- border-bottom: $accordion-content-border;
126
+ padding: $padding;
127
+
128
+ border: $border;
129
+ border-bottom: 0;
130
+ background-color: $background;
131
+
132
+ color: $color;
133
+
134
+ :last-child > &:last-child {
135
+ border-bottom: $border;
136
+ }
94
137
  }
95
138
 
96
139
  @mixin foundation-accordion {
@@ -99,7 +142,7 @@ $accordion-content-padding: 1rem !default;
99
142
  }
100
143
 
101
144
  .accordion-item {
102
- // This class doesn't need styles!
145
+ @include accordion-item;
103
146
  }
104
147
 
105
148
  .accordion-title {