zurb-foundation 4.0.4 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/CHANGELOG.md +26 -2
  2. data/CONTRIBUTING.md +0 -8
  3. data/Gemfile.lock +2 -2
  4. data/docs/_sidebar-components.html.erb +1 -0
  5. data/docs/_sidebar.html.erb +1 -0
  6. data/docs/changelog.html.erb +29 -1
  7. data/docs/components/block-grid.html.erb +11 -2
  8. data/docs/components/clearing.html.erb +1 -1
  9. data/docs/components/custom-forms.html.erb +14 -13
  10. data/docs/components/dropdown.html.erb +1 -1
  11. data/docs/components/flex-video.html.erb +1 -1
  12. data/docs/components/grid.html.erb +2 -2
  13. data/docs/components/joyride.html.erb +1 -1
  14. data/docs/components/magellan.html.erb +1 -1
  15. data/docs/components/orbit.html.erb +5 -1
  16. data/docs/components/pricing-tables.html.erb +3 -3
  17. data/docs/components/progress-bars.html.erb +1 -0
  18. data/docs/components/reveal.html.erb +5 -1
  19. data/docs/components/section.html.erb +66 -4
  20. data/docs/components/split-buttons.html.erb +11 -11
  21. data/docs/components/tooltips.html.erb +1 -1
  22. data/docs/components/top-bar.html.erb +4 -2
  23. data/docs/components/type.html.erb +7 -1
  24. data/docs/components/visibility.html.erb +17 -11
  25. data/docs/javascript.html.erb +1 -1
  26. data/docs/layout.html.erb +3 -3
  27. data/docs/media-queries.html.erb +96 -0
  28. data/docs/sass.html.erb +82 -2
  29. data/foundation.gemspec +1 -1
  30. data/js/foundation/foundation.forms.js +6 -14
  31. data/js/foundation/foundation.joyride.js +12 -10
  32. data/js/foundation/foundation.orbit.js +2 -0
  33. data/js/foundation/foundation.section.js +61 -4
  34. data/js/foundation/foundation.topbar.js +9 -2
  35. data/js/vendor/zepto.js +415 -313
  36. data/lib/foundation/version.rb +1 -1
  37. data/scss/foundation/_foundation-global.scss +4 -0
  38. data/scss/foundation/components/_block-grid.scss +4 -4
  39. data/scss/foundation/components/_button-groups.scss +4 -4
  40. data/scss/foundation/components/_buttons.scss +2 -1
  41. data/scss/foundation/components/_custom-forms.scss +1 -1
  42. data/scss/foundation/components/_forms.scss +3 -4
  43. data/scss/foundation/components/_global.scss +11 -8
  44. data/scss/foundation/components/_magellan.scss +7 -2
  45. data/scss/foundation/components/_orbit.scss +6 -3
  46. data/scss/foundation/components/_progress-bars.scss +6 -4
  47. data/scss/foundation/components/_section.scss +48 -1
  48. data/scss/foundation/components/_top-bar.scss +15 -14
  49. data/scss/foundation/components/_type.scss +3 -3
  50. data/scss/foundation/components/_visibility.scss +259 -55
  51. data/templates/project/scss/_settings.scss +7 -0
  52. metadata +6 -6
  53. data/docs/_zurb-jobs.html.erb +0 -5
@@ -1,3 +1,3 @@
1
1
  module Foundation
2
- VERSION = "4.0.4"
2
+ VERSION = "4.0.5"
3
3
  end
@@ -83,6 +83,7 @@ $include-print-styles: true !default;
83
83
 
84
84
  // We use this to create equal side border radius on elements.
85
85
  @mixin side-radius($side, $radius) {
86
+ @include radius(0);
86
87
  @if $side == left {
87
88
  -moz-border-radius-bottomleft: $radius;
88
89
  -moz-border-radius-topleft: $radius;
@@ -174,6 +175,9 @@ $small-screen: emCalc(768px) !default;
174
175
  $medium-screen: emCalc(1280px) !default;
175
176
  $large-screen: emCalc(1440px) !default;
176
177
 
178
+ $screen: "only screen" !default;
177
179
  $small: "only screen and (min-width:"#{$small-screen}")" !default;
178
180
  $medium: "only screen and (min-width:"#{$medium-screen}")" !default;
179
181
  $large: "only screen and (min-width:"#{$large-screen}")" !default;
182
+ $landscape: "only screen and (orientation: landscape)" !default;
183
+ $portrait: "only screen and (orientation: portrait)" !default;
@@ -35,8 +35,9 @@ $block-grid-media-queries: true !default;
35
35
  &>li {
36
36
  width: 100%/$per-row;
37
37
  padding: 0 $spacing $spacing;
38
+
39
+ &:nth-of-type(#{$per-row}n+1) { clear: both; }
38
40
  }
39
- &:nth-of-type(#{$per-row}n+1) { clear: both; }
40
41
  }
41
42
 
42
43
  }
@@ -57,10 +58,9 @@ $block-grid-media-queries: true !default;
57
58
  @media #{$small} {
58
59
  @for $i from 1 through $block-grid-elements {
59
60
  .large-block-grid-#{($i)} {
60
- @if $i == 2 { @include block-grid(2,15px,false); }
61
- @else if $i == 3 { @include block-grid(3,12px,false); }
62
- @else { @include block-grid($i,$block-grid-default-spacing,false); }
61
+ @include block-grid($i,$block-grid-default-spacing,false);
63
62
  }
64
63
  }
64
+ [class*="small-block-grid-"] > li { clear: none !important; }
65
65
  }
66
66
  }
@@ -34,12 +34,12 @@ $button-bar-margin-right: emCalc(10px) !default;
34
34
 
35
35
  // We use these to control left and right radius on first/last buttons in the group.
36
36
  @if $radius == true {
37
- &:first-child > a { @include side-radius($default-float, $button-radius); }
38
- &:last-child > a { @include side-radius($default-opposite, $button-radius); }
37
+ &:first-child > a, &:first-child > button { @include side-radius($default-float, $button-radius); }
38
+ &:last-child > a, &:last-child > button { @include side-radius($default-opposite, $button-radius); }
39
39
  }
40
40
  @else if $radius {
41
- &:first-child > a { @include side-radius($default-float, $radius); }
42
- &:last-child > a { @include side-radius($default-opposite, $radius); }
41
+ &:first-child > a, &:first-child > button { @include side-radius($default-float, $radius); }
42
+ &:last-child > a, &:last-child > button { @include side-radius($default-opposite, $radius); }
43
43
  }
44
44
 
45
45
  // We use this to make the buttons even width across their container
@@ -13,6 +13,7 @@ $button-display: inline-block !default;
13
13
  $button-margin-bottom: emCalc(20px) !default;
14
14
 
15
15
  // We use these to control button text styles.
16
+ $button-font-family: inherit !default;
16
17
  $button-font-color: #fff !default;
17
18
  $button-font-color-alt: #333 !default;
18
19
  $button-font-med: emCalc(16px) !default;
@@ -47,7 +48,7 @@ $button-disabled-opacity: 0.6 !default;
47
48
  border-style: $button-border-style;
48
49
  border-width: $button-border-width;
49
50
  cursor: pointer;
50
- font-family: inherit;
51
+ font-family: $button-font-family;
51
52
  font-weight: $button-font-weight;
52
53
  line-height: 1;
53
54
  margin: 0 0 $button-margin-bottom;
@@ -45,6 +45,7 @@ $custom-dropdown-width-large: 434px !default;
45
45
 
46
46
  /* Custom Checkbox and Radio Inputs */
47
47
  form.custom {
48
+
48
49
  .custom {
49
50
  display: inline-block;
50
51
  width: 16px;
@@ -57,7 +58,6 @@ form.custom {
57
58
  &.radio { @include radius(1000px); }
58
59
 
59
60
  &.checkbox {
60
- z-index: -1;
61
61
  &:before {
62
62
  content: "";
63
63
  display: block;
@@ -11,6 +11,7 @@ $label-font-size: emCalc(14px) !default;
11
11
  $label-font-weight: 500 !default;
12
12
  $label-font-color: lighten(#000, 30%) !default;
13
13
  $label-bottom-margin: emCalc(3px) !default;
14
+ $input-font-family: inherit !default;
14
15
  $input-font-color: rgba(0,0,0,0.75) !default;
15
16
  $input-font-size: emCalc(14px) !default;
16
17
  $input-bg-color: #fff !default;
@@ -78,7 +79,7 @@ $input-error-message-font-color-alt: #333 !default;
78
79
  // We use this mixin to give all basic form elements their style
79
80
  @mixin form-element() {
80
81
  background-color: $input-bg-color;
81
- font-family: inherit;
82
+ font-family: $input-font-family;
82
83
  border: $input-border-width $input-border-style $input-border-color;
83
84
  -webkit-box-shadow: $input-box-shadow;
84
85
  box-shadow: $input-box-shadow;
@@ -265,8 +266,6 @@ label { @include form-label;
265
266
  .postfix.button.radius { @include side-radius(right, $global-radius); }
266
267
  .prefix.button.round { @include side-radius(left, 1000px); }
267
268
  .postfix.button.round { @include side-radius(right, 1000px); }
268
- .prefix.button.round { @include side-radius(left, 1000px); }
269
- .postfix.button.round { @include side-radius(right, 1000px); }
270
269
 
271
270
  /* Separate prefix and postfix styles when on span so buttons keep their own */
272
271
  span.prefix { @include prefix();
@@ -334,4 +333,4 @@ label.error { @include form-label-error-color; }
334
333
  .error small,
335
334
  small.error {
336
335
  @include form-error-message;
337
- }
336
+ }
@@ -22,6 +22,9 @@ body {
22
22
  -webkit-font-smoothing: $font-smoothing;
23
23
  }
24
24
 
25
+ // Override outline from normalize, we don't like it
26
+ a:focus { outline: none; }
27
+
25
28
  // Grid Defaults to get images and embeds to work properly
26
29
  img,
27
30
  object,
@@ -40,16 +43,16 @@ img { -ms-interpolation-mode: bicubic; }
40
43
  }
41
44
 
42
45
  // Miscellaneous useful HTML classes
43
- .left { float: left; }
44
- .right { float: right; }
45
- .text-left { text-align: left; }
46
- .text-right { text-align: right; }
47
- .text-center { text-align: center; }
48
- .text-justify { text-align: justify; }
46
+ .left { float: left !important; }
47
+ .right { float: right !important; }
48
+ .text-left { text-align: left !important; }
49
+ .text-right { text-align: right !important; }
50
+ .text-center { text-align: center !important; }
51
+ .text-justify { text-align: justify !important; }
49
52
  .hide { display: none; }
50
53
 
51
- // Get rid of gap under images by making them display: block; by default
52
- img { display: block; }
54
+ // Get rid of gap under images by making them display: inline-block; by default
55
+ img { display: inline-block; }
53
56
 
54
57
  //
55
58
  // Global resets for forms
@@ -1,8 +1,13 @@
1
+ //
2
+ // Magellan Variables
3
+ //
4
+ $magellan-bg: #fff !default;
5
+
1
6
  @if $include-html-classes {
2
7
 
3
8
  [data-magellan-expedition] {
4
- background: #fff;
5
- z-index: 999;
9
+ background: $magellan-bg;
10
+ z-index: 997;
6
11
  min-width: 100%;
7
12
  padding: 10px;
8
13
 
@@ -1,6 +1,7 @@
1
1
  // Orbit Settings
2
2
 
3
3
  // We use these to control the caption styles
4
+ $orbit-container-bg: #f5f5f5 !default;
4
5
  $orbit-caption-bg-old-browser: #000 !default;
5
6
  $orbit-caption-bg-old: rgb(0,0,0) !default;
6
7
  $orbit-caption-bg: rgba(0,0,0,0.6) !default;
@@ -23,12 +24,15 @@ $orbit-slide-number-bg: rgb(0,0,0) !default;
23
24
  $orbit-slide-number-font-color: #fff !default;
24
25
  $orbit-slide-number-padding: emCalc(5px) !default;
25
26
 
27
+ // Margin for when Orbit is stacked on small screens
28
+ $stack-on-small-margin-bottom: emCalc(20px) !default;
29
+
26
30
 
27
31
  .orbit-container {
28
32
  overflow: hidden;
29
33
  width: 100%;
30
34
  position: relative;
31
- background: #f5f5f5;
35
+ background: $orbit-container-bg;
32
36
 
33
37
  .orbit-slides-container {
34
38
  list-style: none;
@@ -177,6 +181,7 @@ $orbit-slide-number-padding: emCalc(5px) !default;
177
181
  .orbit-bullets { display: none; }
178
182
  }
179
183
 
184
+
180
185
  @media #{$small} {
181
186
 
182
187
  .touch {
@@ -188,6 +193,4 @@ $orbit-slide-number-padding: emCalc(5px) !default;
188
193
  .orbit-bullets { display: block; }
189
194
  }
190
195
 
191
-
192
-
193
196
  }
@@ -4,6 +4,7 @@
4
4
 
5
5
  // We use this to se the prog bar height
6
6
  $progress-bar-height: emCalc(25px) !default;
7
+ $progress-bar-color: transparent !default;
7
8
 
8
9
  // We use these to control the border styles
9
10
  $progress-bar-border-color: darken(#fff, 20%) !default;
@@ -28,13 +29,14 @@ $progress-meter-alert-color: $alert-color !default;
28
29
 
29
30
  // We use this to set up the progress bar container
30
31
  @mixin progress-container {
32
+ background-color: $progress-bar-color;
31
33
  height: $progress-bar-height;
32
34
  border: $progress-bar-border-size $progress-bar-border-style $progress-bar-border-color;
33
35
  padding: $progress-bar-pad;
34
36
  margin-bottom: $progress-bar-margin-bottom;
35
37
  }
36
38
 
37
- @mixin progress-meter($bg:$primary-color) {
39
+ @mixin progress-meter($bg:$progress-meter-color) {
38
40
  background: $bg;
39
41
  height: 100%;
40
42
  display: block;
@@ -51,9 +53,9 @@ $progress-meter-alert-color: $alert-color !default;
51
53
  .meter {
52
54
  @include progress-meter;
53
55
  }
54
- &.secondary .meter { @include progress-meter($bg:$secondary-color); }
55
- &.success .meter { @include progress-meter($bg:$success-color); }
56
- &.alert .meter { @include progress-meter($bg:$alert-color); }
56
+ &.secondary .meter { @include progress-meter($bg:$progress-meter-secondary-color); }
57
+ &.success .meter { @include progress-meter($bg:$progress-meter-success-color); }
58
+ &.alert .meter { @include progress-meter($bg:$progress-meter-alert-color); }
57
59
 
58
60
  &.radius { @include radius($global-radius);
59
61
  .meter { @include radius($global-radius - 1); }
@@ -53,6 +53,13 @@ $section-bottom-margin: emCalc(20px) !default;
53
53
  @else if $section-type == vertical-nav {
54
54
 
55
55
  }
56
+
57
+ // Horizontal Nav container border styles
58
+ @else if $section-type == horizontal-nav {
59
+ position: relative;
60
+ background: $section-title-bg;
61
+ border: $section-border-size $section-border-style $section-border-color;
62
+ }
56
63
  }
57
64
 
58
65
  // We use this mixin to create the styles for sections as accordions.
@@ -108,10 +115,10 @@ $section-bottom-margin: emCalc(20px) !default;
108
115
  position: static;
109
116
 
110
117
  .title {
111
- top: 1px;
112
118
  width: auto;
113
119
  border: $section-border-size $section-border-style $section-border-color;
114
120
  border-right: 0;
121
+ border-bottom: 0;
115
122
  position: absolute;
116
123
  z-index: 1;
117
124
 
@@ -123,6 +130,7 @@ $section-bottom-margin: emCalc(20px) !default;
123
130
  border: $section-border-size $section-border-style $section-border-color;
124
131
  position: absolute;
125
132
  z-index: 10;
133
+ top: -1px;
126
134
  }
127
135
 
128
136
  &.active {
@@ -157,6 +165,38 @@ $section-bottom-margin: emCalc(20px) !default;
157
165
  }
158
166
  }
159
167
  }
168
+
169
+ // Horizontal Nav Styles
170
+ @else if $section-type == horizontal-nav {
171
+ padding-top: 0;
172
+ border: 0;
173
+ position: static;
174
+
175
+ .title {
176
+ width: auto;
177
+ border: $section-border-size $section-border-style $section-border-color;
178
+ border-left: 0;
179
+ top: -1px;
180
+ position: absolute;
181
+ z-index: 1;
182
+
183
+ a { width: 100%; }
184
+ }
185
+
186
+ .content { display: none; }
187
+
188
+ &.active {
189
+ .content {
190
+ display: block;
191
+ position: absolute;
192
+ z-index: 999;
193
+ left: 0;
194
+ top: -2px;
195
+ min-width: $section-vertical-nav-min-width;
196
+ border: $section-border-size $section-border-style $section-border-color;
197
+ }
198
+ }
199
+ }
160
200
  }
161
201
 
162
202
 
@@ -183,6 +223,13 @@ $section-bottom-margin: emCalc(20px) !default;
183
223
  .section { @include section(vertical-nav); }
184
224
  }
185
225
 
226
+ .section-container.horizontal-nav {
227
+ @include section-container(false, horizontal-nav);
228
+
229
+ section,
230
+ .section { @include section(horizontal-nav); }
231
+ }
232
+
186
233
  .section-container.tabs {
187
234
  @include section-container(false, tabs);
188
235
 
@@ -106,7 +106,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
106
106
  // Menu toggle button on small devices
107
107
  .toggle-topbar {
108
108
  position: absolute;
109
- right: 0;
109
+ #{$default-opposite}: 0;
110
110
  top: 0;
111
111
 
112
112
  a {
@@ -123,10 +123,10 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
123
123
 
124
124
  // Adding the class "menu-icon" will add the 3-line icon people love and adore.
125
125
  &.menu-icon {
126
- right: $topbar-height / 3;
126
+ #{$default-opposite}: $topbar-height / 3;
127
127
  top: 50%;
128
128
  margin-top: -16px;
129
- padding-left: 40px;
129
+ padding-#{$default-float}: 40px;
130
130
 
131
131
  a {
132
132
  text-indent: -48px;
@@ -138,7 +138,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
138
138
 
139
139
  span {
140
140
  position: absolute;
141
- right: 0;
141
+ #{$default-opposite}: 0;
142
142
  display: block;
143
143
  width: 16px;
144
144
  height: 0;
@@ -208,8 +208,9 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
208
208
  & > a {
209
209
  display: block;
210
210
  width: 100%;
211
- padding: 12px 0 12px $topbar-height / 3;
212
- color: $topbar-link-color;
211
+ color: $topbar-dropdown-link-color;
212
+ padding: 12px 0 12px 0;
213
+ padding-#{$default-float}: $topbar-height / 3;
213
214
  font-size: $topbar-link-font-size;
214
215
  font-weight: $topbar-link-weight;
215
216
  background: $topbar-dropdown-bg;
@@ -263,7 +264,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
263
264
  margin-top: -($topbar-dropdown-toggle-size / 2) - 2;
264
265
  position: absolute;
265
266
  top: 50%;
266
- right: 0;
267
+ #{$default-opposite}: 0;
267
268
  }
268
269
  }
269
270
 
@@ -321,7 +322,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
321
322
  .top-bar { background: $topbar-bg; @include clearfix; overflow: visible;
322
323
  .toggle-topbar { display: none; }
323
324
 
324
- .title-area { float: left; }
325
+ .title-area { float: $default-float; }
325
326
  .name h1 a { width: auto; }
326
327
 
327
328
  input,
@@ -349,7 +350,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
349
350
  display: inline;
350
351
 
351
352
  li {
352
- float: left;
353
+ float: $default-float;
353
354
  .js-generated { display: none; }
354
355
  }
355
356
  }
@@ -390,7 +391,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
390
391
  border: none;
391
392
  content: "\00bb";
392
393
  margin-top: -7px;
393
- right: 5px;
394
+ #{$default-opposite}: 5px;
394
395
  }
395
396
  }
396
397
  }
@@ -398,7 +399,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
398
399
  }
399
400
 
400
401
  .dropdown {
401
- left: 0;
402
+ #{$default-float}: 0;
402
403
  top: auto;
403
404
  background: transparent;
404
405
 
@@ -417,7 +418,7 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
417
418
 
418
419
  // Second Level Dropdowns
419
420
  .dropdown {
420
- left: 100%;
421
+ #{$default-float}: 100%;
421
422
  top: 0;
422
423
  }
423
424
  }
@@ -426,8 +427,8 @@ $topbar-media-query: "only screen and (min-width:"#{$topbar-breakpoint}")" !defa
426
427
  & > ul > .divider {
427
428
  border-bottom: none;
428
429
  border-top: none;
429
- border-right: solid 1px lighten($topbar-bg, 10%);
430
- border-left: solid 1px darken($topbar-bg, 10%);
430
+ border-#{$default-opposite}: solid 1px lighten($topbar-bg, 10%);
431
+ border-#{$default-float}: solid 1px darken($topbar-bg, 10%);
431
432
  clear: none;
432
433
  height: $topbar-height;
433
434
  width: 0px;