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
@@ -12,46 +12,164 @@ $topbar-padding: 0.5rem !default;
12
12
 
13
13
  /// Background color for the top bar. This color also cascades to menus within the top bar.
14
14
  /// @type Color
15
- $topbar-background: #eee !default;
15
+ $topbar-background: $light-gray !default;
16
16
 
17
- /// Color for links inside a top bar menu.
17
+ /// Background color submenus within the top bar. Usefull if $topbar-background is transparent.
18
18
  /// @type Color
19
- $topbar-link-color: #fff !default;
19
+ $topbar-submenu-background: $topbar-background !default;
20
20
 
21
- /// Width of `<input>` elements inside the top bar.
21
+ /// Spacing for the top bar title.
22
+ /// @type Number
23
+ $topbar-title-spacing: 0.5rem 1rem 0.5rem 0 !default;
24
+
25
+ /// Maximum width of `<input>` elements inside the top bar.
22
26
  /// @type Number
23
27
  $topbar-input-width: 200px !default;
24
28
 
29
+ /// Breakpoint at which top bar switches from mobile to desktop view.
30
+ /// @type Breakpoint
31
+ $topbar-unstack-breakpoint: medium !default;
32
+
25
33
  /// Adds styles for a top bar container.
26
34
  @mixin top-bar-container {
27
- @include clearfix;
35
+ @if $global-flexbox {
36
+ display: flex;
37
+ flex-wrap: nowrap;
38
+ justify-content: space-between;
39
+ align-items: center;
40
+ }
41
+ @else {
42
+ @include clearfix;
43
+ }
44
+
28
45
  padding: $topbar-padding;
29
46
 
30
- &, ul {
47
+ &,
48
+ ul {
31
49
  background-color: $topbar-background;
32
50
  }
33
51
 
52
+ // Check if $topbar-background is differnt from $topbar-background-submenu
53
+ @if ($topbar-background != $topbar-submenu-background) {
54
+ ul ul {
55
+ background-color: $topbar-submenu-background;
56
+ }
57
+ }
58
+
59
+ // Restrain width of inputs by default to make them easier to arrange
34
60
  input {
35
- width: $topbar-input-width;
61
+ max-width: $topbar-input-width;
36
62
  margin-#{$global-right}: 1rem;
37
63
  }
64
+
65
+ // The above styles shouldn't apply to input group fields
66
+ .input-group-field {
67
+ width: 100%;
68
+ margin-#{$global-right}: 0;
69
+ }
70
+
71
+ input.button { // sass-lint:disable-line no-qualifying-elements
72
+ width: auto;
73
+ }
74
+ }
75
+
76
+ /// Makes sections of a top bar stack on top of each other.
77
+ @mixin top-bar-stacked {
78
+ @if $global-flexbox {
79
+ flex-wrap: wrap;
80
+
81
+ // Sub-sections
82
+ .top-bar-left,
83
+ .top-bar-right {
84
+ flex: 0 0 100%;
85
+ max-width: 100%;
86
+ }
87
+ }
88
+ @else {
89
+ // Sub-sections
90
+ .top-bar-left,
91
+ .top-bar-right {
92
+ width: 100%;
93
+ }
94
+ }
95
+ }
96
+
97
+ /// Undoes the CSS applied by the `top-bar-stacked()` mixin.
98
+ @mixin top-bar-unstack {
99
+ @if $global-flexbox {
100
+ flex-wrap: nowrap;
101
+
102
+ .top-bar-left {
103
+ flex: 1 1 auto;
104
+ margin-right: auto;
105
+ }
106
+
107
+ .top-bar-right {
108
+ flex: 0 1 auto;
109
+ margin-left: auto;
110
+ }
111
+ }
112
+ @else {
113
+ .top-bar-left,
114
+ .top-bar-right {
115
+ width: auto;
116
+ }
117
+ }
38
118
  }
39
119
 
40
120
  @mixin foundation-top-bar {
41
121
  // Top bar container
42
122
  .top-bar {
43
123
  @include top-bar-container;
124
+
125
+ // Stack on small screens by default
126
+ @include top-bar-stacked;
127
+
128
+ @include breakpoint($topbar-unstack-breakpoint) {
129
+ @include top-bar-unstack;
130
+ }
131
+
132
+ // Generate classes for stacking on each screen size (defined in $breakpoint-classes)
133
+ @each $size in $breakpoint-classes {
134
+ @if $size != $-zf-zero-breakpoint {
135
+ &.stacked-for-#{$size} {
136
+ @include breakpoint($size down) {
137
+ @include top-bar-stacked;
138
+ }
139
+ }
140
+ }
141
+ }
44
142
  }
45
143
 
46
144
  // Sub-sections
47
- // Stack on small screens
48
- @include breakpoint(medium) {
145
+ @if $global-flexbox {
146
+ .top-bar-title {
147
+ flex: 0 0 auto;
148
+ margin: $topbar-title-spacing;
149
+ }
150
+
151
+ .top-bar-left,
152
+ .top-bar-right {
153
+ flex: 0 0 auto;
154
+ }
155
+ }
156
+ @else {
157
+ .top-bar-title {
158
+ display: inline-block;
159
+ float: left;
160
+ padding: $topbar-title-spacing;
161
+
162
+ .menu-icon {
163
+ bottom: 2px;
164
+ }
165
+ }
166
+
49
167
  .top-bar-left {
50
168
  float: left;
51
169
  }
52
170
 
53
171
  .top-bar-right {
54
- float: right
172
+ float: right;
55
173
  }
56
174
  }
57
175
  }
@@ -6,7 +6,7 @@
6
6
  /// @param {Keyword} $size - Breakpoint to use. **Must be a breakpoint defined in `$breakpoints`.**
7
7
  @mixin show-for($size) {
8
8
  $size: map-get($breakpoints, $size);
9
- $size: -zf-bp-to-em($size) - (1/16);
9
+ $size: -zf-bp-to-em($size) - (1 / 16);
10
10
 
11
11
  @include breakpoint($size down) {
12
12
  display: none !important;
@@ -20,9 +20,9 @@
20
20
  $upper-bound-size: -zf-map-next($breakpoints, $size);
21
21
 
22
22
  // more often than not this will be correct, just one time round the loop it won't so set in scope here
23
- $lower-bound: -zf-bp-to-em($lower-bound-size) - (1/16);
23
+ $lower-bound: -zf-bp-to-em($lower-bound-size) - (1 / 16);
24
24
  // test actual lower-bound-size, if 0 set it to 0em
25
- @if $lower-bound-size == 0 {
25
+ @if strip-unit($lower-bound-size) == 0 {
26
26
  $lower-bound: -zf-bp-to-em($lower-bound-size);
27
27
  }
28
28
 
@@ -33,6 +33,7 @@
33
33
  }
34
34
  @else {
35
35
  $upper-bound: -zf-bp-to-em($upper-bound-size);
36
+
36
37
  @media screen and (max-width: $lower-bound), screen and (min-width: $upper-bound) {
37
38
  display: none !important;
38
39
  }
@@ -68,7 +69,7 @@
68
69
 
69
70
  // Responsive visibility classes
70
71
  @each $size in $breakpoint-classes {
71
- @if $size != small {
72
+ @if $size != $-zf-zero-breakpoint {
72
73
  .hide-for-#{$size} {
73
74
  @include hide-for($size);
74
75
  }
@@ -88,7 +89,7 @@
88
89
  }
89
90
 
90
91
  // Screen reader visibility classes
91
- // Need a "hide-for-sr" class? Add aria-hidden="true" to the element
92
+ // Need a "hide-for-sr" class? Add aria-hidden='true' to the element
92
93
  .show-for-sr,
93
94
  .show-on-focus {
94
95
  @include element-invisible;
@@ -7,30 +7,35 @@
7
7
  ////
8
8
 
9
9
  @mixin foundation-form-checkbox {
10
- [type="file"],
11
- [type="checkbox"],
12
- [type="radio"] {
10
+ [type='file'],
11
+ [type='checkbox'],
12
+ [type='radio'] {
13
13
  margin: 0 0 $form-spacing;
14
14
  }
15
15
 
16
16
  // Styles for input/label siblings
17
- [type="checkbox"] + label,
18
- [type="radio"] + label {
17
+ [type='checkbox'] + label,
18
+ [type='radio'] + label {
19
19
  display: inline-block;
20
+ vertical-align: baseline;
21
+
20
22
  margin-#{$global-left}: $form-spacing * 0.5;
21
23
  margin-#{$global-right}: $form-spacing;
22
24
  margin-bottom: 0;
23
- vertical-align: baseline;
25
+
26
+ &[for] {
27
+ cursor: pointer;
28
+ }
24
29
  }
25
30
 
26
31
  // Styles for inputs inside labels
27
- label > [type="checkbox"],
28
- label > [type="label"] {
32
+ label > [type='checkbox'],
33
+ label > [type='radio'] {
29
34
  margin-#{$global-right}: $form-spacing * 0.5;
30
35
  }
31
36
 
32
37
  // Normalize file input width
33
- [type="file"] {
38
+ [type='file'] {
34
39
  width: 100%;
35
40
  }
36
41
  }
@@ -16,15 +16,15 @@ $abide-labels: true !default;
16
16
 
17
17
  /// Background color to use for invalid text inputs.
18
18
  /// @type Color
19
- $input-background-invalid: $alert-color !default;
19
+ $input-background-invalid: get-color(alert) !default;
20
20
 
21
21
  /// Color to use for labels of invalid inputs.
22
22
  /// @type Color
23
- $form-label-color-invalid: $alert-color !default;
23
+ $form-label-color-invalid: get-color(alert) !default;
24
24
 
25
25
  /// Default font color for form error text.
26
26
  /// @type Color
27
- $input-error-color: $alert-color !default;
27
+ $input-error-color: get-color(alert) !default;
28
28
 
29
29
  /// Default font size for form error text.
30
30
  /// @type Number
@@ -35,13 +35,19 @@ $input-error-font-size: rem-calc(12) !default;
35
35
  $input-error-font-weight: $global-weight-bold !default;
36
36
 
37
37
  /// Styles the background and border of an input field to have an error state.
38
+ ///
38
39
  /// @param {Color} $background [$alert-color] - Color to use for the background and border.
40
+ /// @param {Number} $background-lighten [10%] - Lightness level of the background color.
39
41
  @mixin form-input-error(
40
- $background: $alert-color
42
+ $background: $input-background-invalid,
43
+ $background-lighten: 10%
41
44
  ) {
42
45
  &:not(:focus) {
43
- background-color: rgba($background, 0.1);
44
46
  border-color: $background;
47
+ background-color: mix($background, $white, $background-lighten);
48
+ &::placeholder {
49
+ color: $background;
50
+ }
45
51
  }
46
52
  }
47
53
 
@@ -50,6 +56,7 @@ $input-error-font-weight: $global-weight-bold !default;
50
56
  display: none;
51
57
  margin-top: $form-spacing * -0.5;
52
58
  margin-bottom: $form-spacing;
59
+
53
60
  font-size: $input-error-font-size;
54
61
  font-weight: $input-error-font-weight;
55
62
  color: $input-error-color;
@@ -23,27 +23,27 @@ $fieldset-margin: rem-calc(18 0) !default;
23
23
  $legend-padding: rem-calc(0 3) !default;
24
24
 
25
25
  @mixin fieldset {
26
- border: $fieldset-border;
27
- padding: $fieldset-padding;
28
26
  margin: $fieldset-margin;
27
+ padding: $fieldset-padding;
28
+ border: $fieldset-border;
29
29
 
30
30
  legend {
31
31
  // Covers up the fieldset's border to create artificial padding
32
- background: $body-background;
33
- padding: $legend-padding;
34
32
  margin: 0;
35
33
  margin-#{$global-left}: rem-calc(-3);
34
+ padding: $legend-padding;
36
35
  }
37
36
  }
38
37
 
39
38
  @mixin foundation-form-fieldset {
40
39
  fieldset {
41
- border: 0;
42
- padding: 0;
43
40
  margin: 0;
41
+ padding: 0;
42
+ border: 0;
44
43
  }
45
44
 
46
45
  legend {
46
+ max-width: 100%;
47
47
  margin-bottom: $form-spacing * 0.5;
48
48
  }
49
49
 
@@ -10,15 +10,17 @@
10
10
  /// @type Number
11
11
  $form-spacing: rem-calc(16) !default;
12
12
 
13
- @import
14
- 'text',
15
- 'checkbox',
16
- 'label',
17
- 'help-text',
18
- 'input-group',
19
- 'fieldset',
20
- 'select',
21
- 'error';
13
+ @import 'text';
14
+ @import 'checkbox';
15
+ @import 'label';
16
+ @import 'help-text';
17
+ @import 'input-group';
18
+ @import 'fieldset';
19
+ @import 'select';
20
+ @import 'range';
21
+ @import 'progress';
22
+ @import 'meter';
23
+ @import 'error';
22
24
 
23
25
  @mixin foundation-forms {
24
26
  @include foundation-form-text;
@@ -8,7 +8,7 @@
8
8
 
9
9
  /// Default color for help text.
10
10
  /// @type Color
11
- $helptext-color: #333 !default;
11
+ $helptext-color: $black !default;
12
12
 
13
13
  /// Default font size for help text.
14
14
  /// @type Number
@@ -22,29 +22,59 @@ $input-prefix-border: 1px solid $medium-gray !default;
22
22
  $input-prefix-padding: 1rem !default;
23
23
 
24
24
  @mixin foundation-form-prepostfix {
25
+ $height: ($input-font-size + $form-spacing * 1.5);
26
+
25
27
  .input-group {
26
- display: table;
28
+ display: if($global-flexbox, flex, table);
27
29
  width: 100%;
28
30
  margin-bottom: $form-spacing;
31
+
32
+ @if $global-flexbox {
33
+ align-items: stretch;
34
+ }
35
+
36
+ > :first-child {
37
+ border-radius: if($global-text-direction == rtl, 0 $input-radius $input-radius 0, $input-radius 0 0 $input-radius);
38
+ }
39
+
40
+ > :last-child {
41
+ > * {
42
+ border-radius: if($global-text-direction == rtl, $input-radius 0 0 $input-radius, 0 $input-radius $input-radius 0);
43
+ }
44
+ }
29
45
  }
30
46
 
31
47
  %input-group-child {
32
- display: table-cell;
33
48
  margin: 0;
34
- vertical-align: middle;
49
+ white-space: nowrap;
50
+
51
+ @if not $global-flexbox {
52
+ display: table-cell;
53
+ vertical-align: middle;
54
+ }
35
55
  }
36
56
 
37
57
  .input-group-label {
38
58
  @extend %input-group-child;
39
- text-align: center;
40
- width: 1%;
41
- height: 100%;
42
59
  padding: 0 $input-prefix-padding;
60
+ border: $input-prefix-border;
43
61
  background: $input-prefix-background;
62
+
44
63
  color: $input-prefix-color;
45
- border: $input-prefix-border;
64
+ text-align: center;
65
+ white-space: nowrap;
66
+
67
+ @if $global-flexbox {
68
+ display: flex;
69
+ flex: 0 0 auto;
70
+ align-items: center;
71
+ }
72
+ @else {
73
+ width: 1%;
74
+ height: 100%;
75
+ }
46
76
 
47
- @if hasvalue($input-prefix-border) {
77
+ @if has-value($input-prefix-border) {
48
78
  &:first-child {
49
79
  border-#{$global-right}: 0;
50
80
  }
@@ -57,14 +87,56 @@ $input-prefix-padding: 1rem !default;
57
87
 
58
88
  .input-group-field {
59
89
  @extend %input-group-child;
90
+ border-radius: 0;
91
+
92
+ @if $global-flexbox {
93
+ flex: 1 1 0px; // sass-lint:disable-line zero-unit
94
+ height: auto;
95
+ min-width: 0;
96
+ }
97
+ @else {
98
+ height: $height;
99
+ }
60
100
  }
61
101
 
62
102
  .input-group-button {
63
103
  @extend %input-group-child;
64
- height: 100%;
65
104
  padding-top: 0;
66
105
  padding-bottom: 0;
67
106
  text-align: center;
68
- width: 1%;
107
+
108
+ @if $global-flexbox {
109
+ display: flex;
110
+ flex: 0 0 auto;
111
+ }
112
+ @else {
113
+ width: 1%;
114
+ height: 100%;
115
+ }
116
+
117
+ a,
118
+ input,
119
+ button,
120
+ label {
121
+ @extend %input-group-child;
122
+
123
+ @if $global-flexbox {
124
+ height: auto;
125
+ align-self: stretch;
126
+ }
127
+ @else {
128
+ height: $height;
129
+ }
130
+ padding-top: 0;
131
+ padding-bottom: 0;
132
+ font-size: $input-font-size;
133
+ }
134
+ }
135
+
136
+ // Specificity bump needed to prevent override by buttons
137
+ @if not $global-flexbox {
138
+ .input-group .input-group-button {
139
+ display: table-cell;
140
+ }
69
141
  }
70
142
  }