zurb-foundation 4.1.2 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. data/CONTRIBUTING.md +2 -2
  2. data/Gemfile.lock +1 -1
  3. data/README.md +11 -7
  4. data/docs/CHANGELOG.md +22 -3
  5. data/docs/_sidebar-components.html.erb +3 -1
  6. data/docs/_sidebar.html.erb +3 -1
  7. data/docs/components/breadcrumbs.html.erb +9 -1
  8. data/docs/components/forms.html.erb +12 -6
  9. data/docs/components/grid.html.erb +3 -3
  10. data/docs/components/kitchen-sink.html.erb +7 -1
  11. data/docs/components/labels.html.erb +3 -1
  12. data/docs/components/section.html.erb +99 -10
  13. data/docs/components/top-bar.html.erb +2 -2
  14. data/docs/components/type.html.erb +31 -2
  15. data/docs/css/docs.scss +0 -5
  16. data/docs/index.html.erb +2 -0
  17. data/docs/javascript.html.erb +8 -5
  18. data/docs/sass.html.erb +1005 -127
  19. data/js/foundation/foundation.clearing.js +8 -4
  20. data/js/foundation/foundation.dropdown.js +43 -23
  21. data/js/foundation/foundation.forms.js +5 -3
  22. data/js/foundation/foundation.joyride.js +2 -6
  23. data/js/foundation/foundation.js +70 -47
  24. data/js/foundation/foundation.orbit.js +10 -4
  25. data/js/foundation/foundation.reveal.js +8 -3
  26. data/js/foundation/foundation.section.js +188 -72
  27. data/js/foundation/foundation.tooltips.js +4 -3
  28. data/js/foundation/foundation.topbar.js +4 -1
  29. data/lib/foundation/generators/install_generator.rb +2 -2
  30. data/lib/foundation/version.rb +1 -1
  31. data/scss/foundation.scss +1 -1
  32. data/{templates/project/scss/_settings.scss → scss/foundation/_variables.scss} +347 -173
  33. data/scss/foundation/components/_alert-boxes.scss +1 -1
  34. data/scss/foundation/components/_block-grid.scss +6 -2
  35. data/scss/foundation/components/_breadcrumbs.scss +20 -13
  36. data/scss/foundation/components/_button-groups.scss +18 -6
  37. data/scss/foundation/components/_buttons.scss +18 -11
  38. data/scss/foundation/components/_clearing.scss +6 -0
  39. data/scss/foundation/components/_custom-forms.scss +29 -23
  40. data/scss/foundation/components/_dropdown-buttons.scss +1 -1
  41. data/scss/foundation/components/_dropdown.scss +7 -3
  42. data/scss/foundation/components/_flex-video.scss +1 -1
  43. data/scss/foundation/components/_forms.scss +49 -25
  44. data/scss/foundation/components/_global.scss +222 -3
  45. data/scss/foundation/components/_grid.scss +40 -24
  46. data/scss/foundation/components/_inline-lists.scss +1 -1
  47. data/scss/foundation/components/_joyride.scss +4 -6
  48. data/scss/foundation/components/_keystrokes.scss +1 -1
  49. data/scss/foundation/components/_labels.scss +5 -3
  50. data/scss/foundation/components/_magellan.scss +1 -1
  51. data/scss/foundation/components/_orbit.scss +13 -8
  52. data/scss/foundation/components/_pagination.scss +1 -1
  53. data/scss/foundation/components/_panels.scss +1 -1
  54. data/scss/foundation/components/_pricing-tables.scss +1 -1
  55. data/scss/foundation/components/_progress-bars.scss +1 -1
  56. data/scss/foundation/components/_reveal.scss +7 -7
  57. data/scss/foundation/components/_section.scss +75 -21
  58. data/scss/foundation/components/_side-nav.scss +1 -1
  59. data/scss/foundation/components/_split-buttons.scss +10 -3
  60. data/scss/foundation/components/_sub-nav.scss +1 -1
  61. data/scss/foundation/components/_switch.scss +1 -1
  62. data/scss/foundation/components/_thumbs.scss +3 -1
  63. data/scss/foundation/components/_top-bar.scss +8 -6
  64. data/scss/foundation/components/_visibility.scss +1 -1
  65. data/scss/normalize.scss +13 -7
  66. data/templates/project/manifest.rb +2 -11
  67. data/templates/project/scss/app.scss +0 -1
  68. metadata +5 -7
  69. data/scss/foundation/_foundation-global.scss +0 -198
  70. data/templates/project/scss/normalize.scss +0 -396
@@ -87,7 +87,7 @@ $alert-radius: $global-radius !defa
87
87
  @include radius($radius);
88
88
  }
89
89
 
90
- @if $include-html-alert-classes {
90
+ @if $include-html-alert-classes != false {
91
91
 
92
92
  /* Foundation Alerts */
93
93
  .alert-box {
@@ -24,7 +24,7 @@ $block-grid-media-queries: true !default;
24
24
  @include clearfix;
25
25
 
26
26
  &>li {
27
- display: block;
27
+ display: inline;
28
28
  height: auto;
29
29
  float: $default-float;
30
30
  padding: 0 $spacing $spacing;
@@ -36,6 +36,7 @@ $block-grid-media-queries: true !default;
36
36
  width: 100%/$per-row;
37
37
  padding: 0 $spacing $spacing;
38
38
 
39
+ &:nth-of-type(n) { clear: none; }
39
40
  &:nth-of-type(#{$per-row}n+1) { clear: both; }
40
41
  }
41
42
  }
@@ -56,11 +57,14 @@ $block-grid-media-queries: true !default;
56
57
 
57
58
  /* Foundation Block Grids for above small breakpoint */
58
59
  @media #{$small} {
60
+ /* Remove small grid clearing */
61
+ @for $i from 1 through $block-grid-elements {
62
+ .small-block-grid-#{($i)} > li:nth-of-type(#{$i}n+1) { clear: none; }
63
+ }
59
64
  @for $i from 1 through $block-grid-elements {
60
65
  .large-block-grid-#{($i)} {
61
66
  @include block-grid($i,$block-grid-default-spacing,false);
62
67
  }
63
68
  }
64
- [class*="small-block-grid-"] > li { clear: none !important; }
65
69
  }
66
70
  }
@@ -6,7 +6,7 @@
6
6
  $crumb-bg: lighten($secondary-color, 5%) !default;
7
7
 
8
8
  // We use these to set the padding around the breadcrumbs.
9
- $crumb-padding: emCalc(6px) emCalc(14px) emCalc(9px) !default;
9
+ $crumb-padding: emCalc(9px) emCalc(14px) emCalc(9px) !default;
10
10
  $crumb-side-padding: emCalc(12px) !default;
11
11
 
12
12
  // We use these to control border styles.
@@ -52,36 +52,40 @@ $crumb-slash: "/" !default;
52
52
 
53
53
  // A normal state will make the links look and act like clickable breadcrumbs.
54
54
  margin: 0;
55
- padding: 0 $crumb-side-padding 0 0;
56
55
  float: $default-float;
56
+ font-size: $crumb-font-size;
57
+ text-transform: $crumb-font-transform;
58
+ color: $crumb-font-color;
57
59
 
58
- &:hover a,
59
- &:focus a { text-decoration: $crumb-link-decor; }
60
+ &:hover a, &:focus a { text-decoration: $crumb-link-decor; }
60
61
 
61
62
  a,
62
63
  span {
63
- font-size: $crumb-font-size;
64
- padding-#{$default-float}: $crumb-side-padding;
65
64
  text-transform: $crumb-font-transform;
66
65
  color: $crumb-font-color;
67
66
  }
68
67
 
69
68
  // Current is for the link of the current page
70
69
  &.current {
70
+ cursor: default;
71
+ color: $crumb-font-color-current;
71
72
  a {
72
73
  cursor: default;
73
74
  color: $crumb-font-color-current;
74
75
  }
75
76
 
76
- &:hover a,
77
- &:focus a { text-decoration: none; }
77
+ &:hover, &:hover a,
78
+ &:focus, &:focus a { text-decoration: none; }
78
79
  }
79
80
 
80
81
  // Unavailable removed color and link styles so it looks inactive.
81
82
  &.unavailable {
83
+ color: $crumb-font-color-unavailable;
82
84
  a { color: $crumb-font-color-unavailable; }
83
85
 
86
+ &:hover,
84
87
  &:hover a,
88
+ &:focus,
85
89
  a:focus {
86
90
  text-decoration: none;
87
91
  color: $crumb-font-color-unavailable;
@@ -92,24 +96,27 @@ $crumb-slash: "/" !default;
92
96
  &:before {
93
97
  content: "#{$crumb-slash}";
94
98
  color: $crumb-slash-color;
99
+ margin: 0 $crumb-side-padding;
95
100
  position: relative;
96
101
  top: 1px;
97
102
  }
98
- &:first-child a,
99
- &:first-child span { padding-#{$default-float}: 0; }
100
- &:first-child:before { content: " "; }
103
+
104
+ &:first-child:before {
105
+ content: " ";
106
+ margin: 0;
107
+ }
101
108
 
102
109
  }
103
110
 
104
111
 
105
- @if $include-html-nav-classes {
112
+ @if $include-html-nav-classes != false {
106
113
 
107
114
  /* Breadcrumbs */
108
115
  .breadcrumbs {
109
116
  @include crumb-container;
110
117
  @include radius($crumb-radius);
111
118
 
112
- li {
119
+ &>* {
113
120
  @include crumbs;
114
121
  }
115
122
  }
@@ -36,24 +36,36 @@ $button-bar-margin-opposite: emCalc(10px) !default;
36
36
 
37
37
  // We use these to control left and right radius on first/last buttons in the group.
38
38
  @if $radius == true {
39
- &:first-child, &:first-child > a, &:first-child > button { @include side-radius($default-float, $button-radius); }
40
- &:last-child, &:last-child > a, &:last-child > button { @include side-radius($opposite-direction, $button-radius); }
39
+ &:first-child,
40
+ &:first-child > a,
41
+ &:first-child > button,
42
+ &:first-child > .button { @include side-radius($default-float, $button-radius); }
43
+ &:last-child,
44
+ &:last-child > a,
45
+ &:last-child > button,
46
+ &:last-child > .button { @include side-radius($opposite-direction, $button-radius); }
41
47
  }
42
48
  @else if $radius {
43
- &:first-child, &:first-child > a, &:first-child > button { @include side-radius($default-float, $radius); }
44
- &:last-child, &:last-child > a, &:last-child > button { @include side-radius($opposite-direction, $radius); }
49
+ &:first-child,
50
+ &:first-child > a,
51
+ &:first-child > button,
52
+ &:first-child > .button { @include side-radius($default-float, $radius); }
53
+ &:last-child,
54
+ &:last-child > a,
55
+ &:last-child > button,
56
+ &:last-child > .button { @include side-radius($opposite-direction, $radius); }
45
57
  }
46
58
 
47
59
  // We use this to make the buttons even width across their container
48
60
  @if $even {
49
61
  width: percentage((100/$even) / 100);
50
- .button { width: 100%; }
62
+ button, .button { width: 100%; }
51
63
  }
52
64
 
53
65
  }
54
66
 
55
67
  // Only include these CSS classes if $include-html-classes: true
56
- @if $include-html-button-classes {
68
+ @if $include-html-button-classes != false {
57
69
 
58
70
  /* Button Groups */
59
71
  .button-group { @include button-group-container;
@@ -81,10 +81,16 @@ $button-disabled-opacity: 0.6 !default;
81
81
 
82
82
  // We can set $full-width:true to remove side padding extend width.
83
83
  @if $full-width {
84
- padding-top: $padding;
85
- padding-#{$opposite-direction}: 0px;
86
- padding-bottom: $padding + emCalc(1px);
87
- padding-#{$default-float}: 0px;
84
+ // We still need to check if $padding is set.
85
+ @if $padding {
86
+ padding-top: $padding;
87
+ padding-bottom: $padding + emCalc(1px);
88
+ } @else if $padding == false {
89
+ padding-top:0;
90
+ padding-bottom:0;
91
+ }
92
+ padding-right: 0px;
93
+ padding-left: 0px;
88
94
  width: 100%;
89
95
  }
90
96
 
@@ -155,7 +161,7 @@ $button-disabled-opacity: 0.6 !default;
155
161
  //
156
162
 
157
163
  // Only include these classes if the variable is true, otherwise they'll be left out.
158
- @if $include-html-button-classes {
164
+ @if $include-html-button-classes != false {
159
165
 
160
166
  // Default styles applied outside of media query
161
167
  button, .button {
@@ -170,7 +176,7 @@ $button-disabled-opacity: 0.6 !default;
170
176
  &.large { @include button-size($padding:$button-lrg); }
171
177
  &.small { @include button-size($padding:$button-sml); }
172
178
  &.tiny { @include button-size($padding:$button-tny); }
173
- &.expand { @include button-size(false,$full-width:true); }
179
+ &.expand { @include button-size($padding:null,$full-width:true); }
174
180
 
175
181
  &.left-align { text-align: left; text-indent: emCalc(12px); }
176
182
  &.right-align { text-align: right; padding-right: emCalc(12px); }
@@ -183,8 +189,7 @@ $button-disabled-opacity: 0.6 !default;
183
189
 
184
190
  }
185
191
 
186
- input.button,
187
- button.button {
192
+ button, .button {
188
193
  @include button-size($padding:false, $is-input:$button-med);
189
194
  &.tiny { @include button-size($padding:false, $is-input:$button-tny); }
190
195
  &.small { @include button-size($padding:false, $is-input:$button-sml); }
@@ -194,7 +199,7 @@ $button-disabled-opacity: 0.6 !default;
194
199
  // Styles for any browser or device that support media queries
195
200
  @media only screen {
196
201
 
197
- .button {
202
+ button, .button {
198
203
  @include inset-shadow();
199
204
  @include single-transition(background-color);
200
205
 
@@ -210,10 +215,12 @@ $button-disabled-opacity: 0.6 !default;
210
215
 
211
216
  // Additional styles for screens larger than 768px
212
217
  @media #{$small} {
213
- .button {
218
+
219
+ button, .button {
214
220
  @include button-base($style:false, $display:inline-block);
215
221
  @include button-size($padding:false, $full-width:false);
216
222
  }
223
+
217
224
  }
218
225
 
219
- }
226
+ }
@@ -35,6 +35,12 @@ $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255) !default;
35
35
  [data-clearing] {
36
36
  @include clearfix;
37
37
  margin-bottom: 0;
38
+ list-style: none;
39
+
40
+ li {
41
+ float: $default-float;
42
+ margin-#{$opposite-direction}: 10px;
43
+ }
38
44
  }
39
45
 
40
46
  .clearing-blackout {
@@ -32,8 +32,8 @@ $custom-dropdown-font-color-selected: #000 !default;
32
32
  $custom-dropdown-shadow: 0 2px 2px 0px rgba(0,0,0,0.1) !default;
33
33
  $custom-dropdown-offset-top: auto !default;
34
34
  $custom-dropdown-list-padding: emCalc(4px) !default;
35
- $custom-dropdown-default-float-padding: emCalc(6px) !default;
36
- $custom-dropdown-opposite-padding: emCalc(38px) !default;
35
+ $custom-dropdown-default-float-padding: emCalc(6px) !default;
36
+ $custom-dropdown-opposite-padding: emCalc(38px) !default;
37
37
  $custom-dropdown-list-item-min-height: emCalc(24px) !default;
38
38
  $custom-dropdown-width-small: 134px !default;
39
39
  $custom-dropdown-width-medium: 254px !default;
@@ -44,11 +44,17 @@ $custom-dropdown-width-large: 434px !default;
44
44
  // We may look at updating this in the future.
45
45
 
46
46
  // Only include these classes if the variable is true, otherwise they'll be left out.
47
- @if $include-html-button-classes {
48
-
47
+ @if $include-html-button-classes != false {
48
+
49
49
  /* Custom Checkbox and Radio Inputs */
50
50
  form.custom {
51
-
51
+
52
+ .hidden-field {
53
+ margin-#{$default-float}: -99999px;
54
+ position: absolute;
55
+ visibility: hidden;
56
+ }
57
+
52
58
  .custom {
53
59
  display: inline-block;
54
60
  width: 16px;
@@ -57,9 +63,9 @@ $custom-dropdown-width-large: 434px !default;
57
63
  top: 2px;
58
64
  border: solid 1px $custom-form-border-color;
59
65
  background: $custom-form-bg;
60
-
66
+
61
67
  &.radio { @include radius(1000px); }
62
-
68
+
63
69
  &.checkbox {
64
70
  &:before {
65
71
  content: "";
@@ -75,7 +81,7 @@ $custom-dropdown-width-large: 434px !default;
75
81
  color: #fff;
76
82
  }
77
83
  }
78
-
84
+
79
85
  &.radio.checked {
80
86
  &:before {
81
87
  content: "";
@@ -89,7 +95,7 @@ $custom-dropdown-width-large: 434px !default;
89
95
  #{$default-float}: 3px;
90
96
  }
91
97
  }
92
-
98
+
93
99
  &.checkbox.checked {
94
100
  &:before {
95
101
  content: "\00d7";
@@ -98,7 +104,7 @@ $custom-dropdown-width-large: 434px !default;
98
104
  }
99
105
  }
100
106
  }
101
-
107
+
102
108
  /* Custom Select Options and Dropdowns */
103
109
  form.custom {
104
110
  .custom.dropdown {
@@ -118,12 +124,12 @@ $custom-dropdown-width-large: 434px !default;
118
124
  box-shadow: none;
119
125
  font-size: $custom-dropdown-font-size;
120
126
  vertical-align: top;
121
-
127
+
122
128
  ul {
123
129
  overflow-y: auto;
124
130
  max-height: $custom-dropdown-height;
125
131
  }
126
-
132
+
127
133
  .current {
128
134
  cursor:default;
129
135
  white-space: nowrap;
@@ -135,7 +141,7 @@ $custom-dropdown-width-large: 434px !default;
135
141
  margin-#{$default-float}: $form-spacing / 2;
136
142
  margin-#{$opposite-direction}: $custom-select-height;
137
143
  }
138
-
144
+
139
145
  .selector {
140
146
  cursor:default;
141
147
  position: absolute;
@@ -154,13 +160,13 @@ $custom-dropdown-width-large: 434px !default;
154
160
  margin-top: -3px;
155
161
  }
156
162
  }
157
-
163
+
158
164
  &:hover, &.open {
159
165
  a.selector {
160
166
  &:after { @include css-triangle(5px, $custom-select-triangle-color-open, top); }
161
167
  }
162
168
  }
163
-
169
+
164
170
  .disabled {
165
171
  color: $custom-select-disabled-color;
166
172
  &:hover {
@@ -169,24 +175,24 @@ $custom-dropdown-width-large: 434px !default;
169
175
  &:after { display: none; }
170
176
  }
171
177
  }
172
-
178
+
173
179
  &.open ul {
174
180
  display: block;
175
181
  z-index: 10;
176
182
  min-width:100%;
177
183
  @include box-sizing(content-box);
178
184
  }
179
-
185
+
180
186
  &.small { max-width: $custom-dropdown-width-small; }
181
187
  &.medium { max-width: $custom-dropdown-width-medium; }
182
188
  &.large { max-width: $custom-dropdown-width-large; }
183
189
  &.expand { width: 100% !important; }
184
-
190
+
185
191
  &.open.small ul { min-width: $custom-dropdown-width-small; @include box-sizing(border-box); }
186
192
  &.open.medium ul { min-width: $custom-dropdown-width-medium; @include box-sizing(border-box); }
187
193
  &.open.large ul { min-width: $custom-dropdown-width-large; @include box-sizing(border-box); }
188
194
  }
189
-
195
+
190
196
  .custom.dropdown ul {
191
197
  position: absolute;
192
198
  width: auto;
@@ -201,7 +207,7 @@ $custom-dropdown-width-large: 434px !default;
201
207
  background: $custom-dropdown-bg;
202
208
  border: $custom-dropdown-border-style $custom-dropdown-border-width $custom-dropdown-border-color;
203
209
  font-size: $em-base;
204
-
210
+
205
211
  li {
206
212
  color: $custom-dropdown-font-color;
207
213
  font-size: $custom-dropdown-font-size;
@@ -215,7 +221,7 @@ $custom-dropdown-width-large: 434px !default;
215
221
  margin: 0;
216
222
  white-space: nowrap;
217
223
  list-style: none;
218
-
224
+
219
225
  &.selected {
220
226
  background: $custom-dropdown-color-selected;
221
227
  color: $custom-dropdown-font-color-selected;
@@ -230,10 +236,10 @@ $custom-dropdown-width-large: 434px !default;
230
236
  color: $custom-dropdown-font-color-selected;
231
237
  }
232
238
  }
233
-
239
+
234
240
  &.show { display: block; }
235
241
  }
236
-
242
+
237
243
  /* Custom input, disabled */
238
244
  .custom.disabled { background-color: $custom-form-bg-disabled; }
239
245
  }
@@ -101,7 +101,7 @@ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px) !default;
101
101
  }
102
102
 
103
103
 
104
- @if $include-html-button-classes {
104
+ @if $include-html-button-classes != false {
105
105
 
106
106
  /* Dropdown Button */
107
107
  .dropdown.button { @include dropdown-button;
@@ -105,18 +105,22 @@ $f-dropdown-content-padding: emCalc(20px) !default;
105
105
  @mixin dropdown-style {
106
106
  font-size: $f-dropdown-font-size;
107
107
  cursor: pointer;
108
- padding: $f-dropdown-list-padding;
108
+
109
109
  line-height: $f-dropdown-line-height;
110
110
  margin: 0;
111
111
 
112
112
  &:hover,
113
113
  &:focus { background: $f-dropdown-list-hover-bg; }
114
114
 
115
- a { color: $f-dropdown-font-color; }
115
+ a {
116
+ display: block;
117
+ padding: $f-dropdown-list-padding;
118
+ color: $f-dropdown-font-color;
119
+ }
116
120
  }
117
121
 
118
122
 
119
- @if $include-html-nav-classes {
123
+ @if $include-html-nav-classes != false {
120
124
 
121
125
  @media only screen and (max-width: 767px) {
122
126
  .f-dropdown {