zurb-foundation 3.0.8.rc1 → 3.0.8

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.
data/foundation.gemspec CHANGED
@@ -17,5 +17,6 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_dependency "compass", [">= 0.12.2"]
19
19
  gem.add_dependency "sass", [">= 3.2.0.alpha.244"]
20
+ gem.add_dependency "modular-scale", [">= 1.0.0"]
20
21
  gem.add_dependency "rake"
21
22
  end
data/index.html CHANGED
@@ -14,7 +14,7 @@
14
14
  <title>Welcome to Foundation</title>
15
15
 
16
16
  <!-- Included CSS Files -->
17
- <link rel="stylesheet" href="marketing/stylesheets/index.css">
17
+ <link rel="stylesheet" href="test/stylesheets/styles.css">
18
18
 
19
19
  <script src="vendor/assets/javascripts/foundation/modernizr.foundation.js"></script>
20
20
 
@@ -1,3 +1,3 @@
1
1
  module Foundation
2
- VERSION = "3.0.8.rc1"
2
+ VERSION = "3.0.8"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  root = File.join(File.dirname(__FILE__), "..")
2
2
  require "foundation/version"
3
3
  require "compass"
4
- # require "modular-scale"
4
+ require "modular-scale"
5
5
 
6
6
  Compass::Frameworks.register("foundation",
7
7
  :stylesheets_directory => File.join(root,"scss"),
data/scss/foundation.scss CHANGED
@@ -5,6 +5,8 @@
5
5
 
6
6
  @import "compass/css3";
7
7
 
8
+ @import "modular-scale";
9
+
8
10
  @import "foundation/functions/all";
9
11
 
10
12
  @import "foundation/settings";
@@ -57,8 +57,10 @@ $complementaryWidth: 20% !default;
57
57
 
58
58
  // Modular Scale Settings
59
59
 
60
- $ratio: $golden !default;
61
- $base-size: 14px 44px !default;
60
+ // $ratio: $golden; // THIS IS DEFAULT IN MODULAR-SCALE
61
+ $baseFontSize: 14px !default;
62
+ $importantModNum: 44px !default;
63
+ $base-size: $baseFontSize $importantModNum;
62
64
  // Produced the following list of values: 14, 17, 23, 27, 37, 44, 59, 71, 95, 115;
63
65
  // http://www.modularscale.com by Tim Brown
64
66
  // https://github.com/scottkellum/modular-scale by scottkellum
@@ -1,3 +1,4 @@
1
+ @import "ratios";
1
2
  @import "globals";
2
3
  @import "typography";
3
4
  @import "forms";
@@ -56,7 +56,7 @@
56
56
 
57
57
  @media only screen and (max-width: $screenSmall - 1) {
58
58
  @for $i from 1 through $totalColumns {
59
- input[type="text"].#{convert-number-to-word($i)}, textarea.#{convert-number-to-word($i)} { width: 100% !important; }
59
+ input[type="text"].#{convert-number-to-word($i)}, input[type="password"].#{convert-number-to-word($i)}, input[type="date"].#{convert-number-to-word($i)}, input[type="datetime"].#{convert-number-to-word($i)}, input[type="email"].#{convert-number-to-word($i)}, input[type="number"].#{convert-number-to-word($i)}, input[type="search"].#{convert-number-to-word($i)}, input[type="tel"].#{convert-number-to-word($i)}, input[type="time"].#{convert-number-to-word($i)}, input[type="url"].#{convert-number-to-word($i)}, textarea.#{convert-number-to-word($i)} { width: 100% !important; }
60
60
  }
61
61
  }
62
62
 
@@ -0,0 +1,19 @@
1
+ // Ratios
2
+ $golden: 1.618;
3
+ $gold: $golden;
4
+ $double-octave: (4 / 1);
5
+ $major-twelfth: (3 / 1);
6
+ $major-eleventh: (8 / 3);
7
+ $major-tenth: (5 / 2);
8
+ $octave: (2 / 1);
9
+ $major-seventh: (15 / 8);
10
+ $minor-seventh: (16 / 9);
11
+ $major-sixth: (5 / 3);
12
+ $minor-sixth: (8 / 5);
13
+ $fifth: (3 / 2);
14
+ $augfourth: (1 / 1.4142135623730950488); // (1 / square root 2)
15
+ $fourth: (4 / 3);
16
+ $major-third: (5 / 4);
17
+ $minor-third: (6 / 5);
18
+ $major-second: (9 / 8);
19
+ $minor-second: (16 / 15);
@@ -140,7 +140,26 @@ that IE7/8 do not support :nth-child.
140
140
 
141
141
  /* Mobile Block Grids */
142
142
  @media only screen and (max-width: $screenSmall - 1) {
143
- .block-grid.mobile { margin-left: 0;
143
+ .block-grid.mobile {
144
144
  &>li { float: none; width: 100%; margin-left: 0; }
145
145
  }
146
+
147
+ .block-grid {
148
+ &>li { clear: none !important; }
149
+ &.mobile-two-up>li { width: 50%;
150
+ &:nth-child(2n+1) { clear: both; }
151
+ }
152
+
153
+ &.mobile-three-up>li { width: 33.33%;
154
+ &:nth-child(3n+1) { clear: both !important; }
155
+ }
156
+
157
+ &.mobile-four-up>li { width: 25%;
158
+ &:nth-child(4n+1) { clear: both; }
159
+ }
160
+
161
+ &.mobile-five-up>li {
162
+ &:nth-child(5n+1) { clear: both; }
163
+ }
164
+ }
146
165
  }
@@ -1,3 +1,2 @@
1
- @import "modular-scale";
2
1
  @import "convert-number-to-word";
3
2
  @import "grid-calc";
@@ -121,27 +121,11 @@
121
121
 
122
122
  <!-- Included JS Files (Uncompressed) -->
123
123
  <script src="javascripts/foundation/jquery.js"></script>
124
- <script src="javascripts/foundation/jquery.foundation.reveal.js"></script>
125
- <script src="javascripts/foundation/jquery.foundation.orbit.js"></script>
126
- <script src="javascripts/foundation/jquery.foundation.forms.js"></script>
127
- <script src="javascripts/foundation/jquery.placeholder.js"></script>
128
- <script src="javascripts/foundation/jquery.foundation.tooltips.js"></script>
129
- <script src="javascripts/foundation/jquery.foundation.alerts.js"></script>
130
- <script src="javascripts/foundation/jquery.foundation.buttons.js"></script>
131
- <script src="javascripts/foundation/jquery.foundation.accordion.js"></script>
132
- <script src="javascripts/foundation/jquery.foundation.navigation.js"></script>
133
- <script src="javascripts/foundation/jquery.foundation.mediaQueryToggle.js"></script>
134
- <script src="javascripts/foundation/jquery.foundation.tabs.js"></script>
124
+ <% @template[:options][:javascripts].each do |f| %>
125
+ <script src="javascripts/<%= f %>"></script>
126
+ <% end %>
135
127
 
136
- <!-- Included JS Files (Compressed) -->
137
- <!--
138
- <script src="javascripts/jquery.min.js"></script>
139
- <script src="javascripts/foundation.min.js"></script>
140
- -->
141
-
142
- <!-- Application Javascript, safe to override -->
143
- <script src="javascripts/foundation/app.js"></script>
144
-
145
-
128
+ <!-- Application Javascript, safe to override -->
129
+ <script src="javascripts/foundation/app.js"></script>
146
130
  </body>
147
131
  </html>
@@ -5,7 +5,6 @@ stylesheet 'scss/_settings.scss', :to => '_settings.scss
5
5
  stylesheet 'scss/app.scss', :to => 'app.scss', :media => "screen, projector, print"
6
6
 
7
7
  # Make sure you list all the project template files here in the manifest.
8
- html 'index.html', :erb => true # use Foundation::VERSION
9
8
  file 'humans.txt'
10
9
  file 'robots.txt'
11
10
  file 'MIT-LICENSE.txt'
@@ -15,7 +14,8 @@ file 'MIT-LICENSE.txt'
15
14
  # outside the compass template
16
15
  def copy_images_from(relative_path, prefix_path)
17
16
  absolute_path = File.join(File.dirname(__FILE__), relative_path, prefix_path)
18
- Dir.glob("#{absolute_path}/*.*") do |img|
17
+ img_files = Dir.glob("#{absolute_path}/*.*")
18
+ img_files.each do |img|
19
19
  image "#{relative_path}/#{prefix_path}/#{File.basename(img)}",
20
20
  :to => "#{prefix_path}/#{File.basename(img)}"
21
21
  end
@@ -29,10 +29,22 @@ def copy_js_from(relative_path, prefix_path, excludes=[])
29
29
  javascript "#{relative_path}/#{prefix_path}/#{File.basename(js)}",
30
30
  :to => "#{prefix_path}/#{File.basename(js)}"
31
31
  end
32
+ return js_files.map {|f| "#{prefix_path}/#{File.basename(f)}"}
32
33
  end
33
34
 
34
35
  copy_images_from("../../vendor/assets/images", "foundation/orbit")
35
- copy_js_from("../../vendor/assets/javascripts", "foundation", ["index.js"])
36
+ javascripts = copy_js_from("../../vendor/assets/javascripts", "foundation", ["index.js"])
37
+
38
+ javascripts.reject! do |f|
39
+ [
40
+ "jquery.js",
41
+ "modernizr.foundation.js",
42
+ "app.js",
43
+ "jquery.offcanvas.js"
44
+ ].include?(File.basename(f))
45
+ end
46
+
47
+ html 'index.html', :erb => true, :javascripts => javascripts
36
48
 
37
49
  help %Q{
38
50
 
@@ -1,4 +1,4 @@
1
- @import "foundation/functions/modular-scale";
1
+ @import "foundation/common/ratios";
2
2
 
3
3
  // Settings file containing Foundation defaults
4
4
 
@@ -55,7 +55,8 @@
55
55
 
56
56
  // Modular Scale
57
57
  // $ratio: $golden;
58
- // $base-size: 14px 44px;
58
+ // $baseFontSize: 14px;
59
+ // $importantModNum: 44px;
59
60
 
60
61
  // Tooltip Settings
61
62
  // $hasTipBorderBottom: dotted 1px #ccc;
data/test/grid.html CHANGED
@@ -524,7 +524,7 @@
524
524
  </ul>
525
525
 
526
526
  <h6>Five-up</h6>
527
- <ul class="block-grid five-up">
527
+ <ul class="block-grid five-up mobile-three-up">
528
528
  <li>Five-up element</li>
529
529
  <li>Five-up element</li>
530
530
  <li>Five-up element</li>
@@ -1,5 +1,3 @@
1
- @import "foundation/functions/modular-scale";
2
-
3
1
  // Settings file containing Foundation defaults
4
2
 
5
3
  // Grid Settings
@@ -55,7 +53,8 @@
55
53
 
56
54
  // Modular Scale
57
55
  // $ratio: $golden;
58
- // $base-size: 14px 44px;
56
+ $baseFontSize: 14px;
57
+ $importantModNum: 44px;
59
58
 
60
59
  // Tooltip Settings
61
60
  // $hasTipBorderBottom: dotted 1px #ccc;
@@ -1,15 +1,15 @@
1
1
  (function ($){
2
-
2
+
3
3
  $.fn.foundationAccordion = function (options) {
4
-
5
- $('.accordion li', this).on('click.fndtn', function () {
4
+
5
+ $(document).on('click.fndtn', '.accordion li', function () {
6
6
  var flyout = $(this).children('.content').first();
7
7
  $('.accordion .content').not(flyout).hide().parent('li').removeClass('active');
8
8
  flyout.show(0, function () {
9
9
  flyout.parent('li').addClass('active');
10
10
  });
11
11
  });
12
-
12
+
13
13
  };
14
14
 
15
15
  })( jQuery );
@@ -1,33 +1,33 @@
1
1
  (function ($) {
2
-
3
- $.fn.foundationButtons = function(options) {
2
+
3
+ $.fn.foundationButtons = function(options) {
4
4
  // Prevent event propagation on disabled buttons
5
- $('.button.disabled', this).on('click.fndtn', function (event) {
6
- event.preventDefault();
5
+ $(document).on('click.fndtn', '.button.disabled', function (e) {
6
+ e.preventDefault();
7
7
  });
8
-
8
+
9
9
  $('.button.dropdown > ul', this).addClass('no-hover');
10
10
 
11
- $('.button.dropdown, .button.dropdown.split span', this).on('click.fndtn', function (e) {
11
+ $(document).on('click.fndtn', '.button.dropdown, .button.dropdown.split span', function (e) {
12
12
  // Stops further propagation of the event up the DOM tree when clicked on the button.
13
13
  // Events fired by its descendants are not being blocked.
14
14
  if (e.target === this) {
15
15
  e.stopPropagation();
16
16
  }
17
17
  });
18
- $('.button.dropdown.split span', this).on('click.fndtn', function (e) {
18
+ $(document).on('click.fndtn', '.button.dropdown.split span', function (e) {
19
19
  e.preventDefault();
20
20
  $('.button.dropdown', this).not($(this).parent()).children('ul').removeClass('show-dropdown');
21
21
  $(this).siblings('ul').toggleClass('show-dropdown');
22
22
  });
23
- $('.button.dropdown', this).not('.split').on('click.fndtn', function (e) {
23
+ $(document).on('click.fndtn', '.button.dropdown:not(.split)', function (e) {
24
24
  $('.button.dropdown', this).not(this).children('ul').removeClass('show-dropdown');
25
25
  $(this).children('ul').toggleClass('show-dropdown');
26
26
  });
27
- $('body, html').on('click.fndtn', function () {
27
+ $(document).on('click.fndtn', 'body, html', function () {
28
28
  $('.button.dropdown ul').removeClass('show-dropdown');
29
29
  });
30
-
30
+
31
31
  // Positioning the Flyout List
32
32
  var normalButtonHeight = $('.button.dropdown:not(.large):not(.small):not(.tiny)', this).outerHeight() - 1,
33
33
  largeButtonHeight = $('.button.large.dropdown', this).outerHeight() - 1,
@@ -43,7 +43,7 @@
43
43
  $('.button.dropdown.up.large > ul', this).css('top', 'auto').css('bottom', largeButtonHeight - 2);
44
44
  $('.button.dropdown.up.small > ul', this).css('top', 'auto').css('bottom', smallButtonHeight - 2);
45
45
  $('.button.dropdown.up.tiny > ul', this).css('top', 'auto').css('bottom', tinyButtonHeight - 2);
46
-
46
+
47
47
  };
48
48
 
49
49
  })( jQuery );
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  (function( $ ){
10
-
10
+
11
11
  /**
12
12
  * Helper object used to quickly adjust all hidden parent element's, display and visibility properties.
13
13
  * This is currently used for the custom drop downs. When the dropdowns are contained within a reveal modal
@@ -39,25 +39,25 @@
39
39
  adjust : function( $child ) {
40
40
  // Internal reference.
41
41
  var _self = this;
42
-
42
+
43
43
  // Set all hidden parent elements, including this element.
44
44
  _self.hidden = $child.parents().andSelf().filter( ":hidden" );
45
-
45
+
46
46
  // Loop through all hidden elements.
47
47
  _self.hidden.each( function() {
48
-
48
+
49
49
  // Cache the element.
50
50
  var $elem = $( this );
51
-
51
+
52
52
  // Store the style attribute.
53
53
  // Undefined if element doesn't have a style attribute.
54
54
  _self.tmp.push( $elem.attr( 'style' ) );
55
-
55
+
56
56
  // Set the element's display property to block,
57
57
  // but ensure it's visibility is hidden.
58
58
  $elem.css( { 'visibility' : 'hidden', 'display' : 'block' } );
59
59
  });
60
-
60
+
61
61
  }, // end adjust
62
62
 
63
63
  /**
@@ -96,7 +96,7 @@
96
96
 
97
97
  jQuery.foundation = jQuery.foundation || {};
98
98
  jQuery.foundation.customForms = jQuery.foundation.customForms || {};
99
-
99
+
100
100
  $.foundation.customForms.appendCustomMarkup = function ( options ) {
101
101
 
102
102
  var defaults = {
@@ -207,7 +207,7 @@
207
207
  // Insert the the currently selected list item before all other elements.
208
208
  // Then, find the element and assign it to $currentSelect.
209
209
  //
210
-
210
+
211
211
  $currentSelect = $customSelect.prepend( '<a href="#" class="current">' + $selectedOption.html() + '</a>' ).find( ".current" );
212
212
  //
213
213
  // Add the custom select element after the <select> element.
@@ -260,7 +260,7 @@
260
260
  if ($currentSelect) {
261
261
  $currentSelect.html( $( this ).html() );
262
262
  }
263
-
263
+
264
264
  }
265
265
 
266
266
  });
@@ -366,11 +366,9 @@
366
366
  var $input = $element.prev(),
367
367
  input = $input[0];
368
368
 
369
- if (false == $input.is(':disabled')) {
369
+ if (false === $input.is(':disabled')) {
370
370
  input.checked = ((input.checked) ? false : true);
371
371
  $element.toggleClass('checked');
372
-
373
- $input.trigger('change');
374
372
  }
375
373
  };
376
374
 
@@ -378,7 +376,7 @@
378
376
  var $input = $element.prev(),
379
377
  input = $input[0];
380
378
 
381
- if (false == $input.is(':disabled')) {
379
+ if (false === $input.is(':disabled')) {
382
380
  $('input:radio[name="' + $input.attr('name') + '"]').each(function () {
383
381
  $(this).next().removeClass('checked');
384
382
  });
@@ -432,7 +430,7 @@
432
430
  event.preventDefault();
433
431
  $('div.dropdown').removeClass('open');
434
432
 
435
- if (false == $select.is(':disabled')) {
433
+ if (false === $select.is(':disabled')) {
436
434
  $dropdown.toggleClass('open');
437
435
 
438
436
  if ($dropdown.hasClass('open')) {
@@ -477,9 +475,9 @@
477
475
  $select[0].selectedIndex = selectedIndex;
478
476
 
479
477
  $select.trigger('change');
480
- });
481
-
482
-
478
+ });
479
+
480
+
483
481
  $.fn.foundationCustomForms = $.foundation.customForms.appendCustomMarkup;
484
482
 
485
483
  })( jQuery );
@@ -2,12 +2,16 @@
2
2
 
3
3
  $.fn.foundationMediaQueryViewer = function (options) {
4
4
 
5
- var settings = $.extend(options,{toggleKey:77}); // Press 'M'
6
-
7
- $(document).keyup(function(e) {
5
+ var settings = $.extend(options,{toggleKey:77}); // // Press 'M'
6
+ $(document).on("keyup.mediaQueryViewer", ":input", function(e){
7
+ if (e.which === settings.toggleKey) {
8
+ e.stopPropagation();
9
+ }
10
+ });
11
+ $(document).on("keyup.mediaQueryViewer", function(e) {
8
12
  var $mqViewer = $('#fqv');
9
13
 
10
- if (e.keyCode == settings.toggleKey) {
14
+ if (e.which === settings.toggleKey) {
11
15
  if ($mqViewer.length > 0) {
12
16
  $mqViewer.remove();
13
17
  } else {
@@ -1,11 +1,11 @@
1
1
  (function ($){
2
-
2
+
3
3
  $.fn.foundationNavigation = function (options) {
4
-
4
+
5
5
  var lockNavBar = false;
6
6
  // Windows Phone, sadly, does not register touch events :(
7
7
  if (Modernizr.touch || navigator.userAgent.match(/Windows Phone/i)) {
8
- $('.nav-bar a.flyout-toggle', this).on('click.fndtn touchstart.fndtn', function (e) {
8
+ $(document).on('click.fndtn touchstart.fndtn', '.nav-bar a.flyout-toggle', function (e) {
9
9
  e.preventDefault();
10
10
  var flyout = $(this).siblings('.flyout').first();
11
11
  if (lockNavBar === false) {
@@ -24,7 +24,7 @@
24
24
  $(this).children('.flyout').hide();
25
25
  });
26
26
  }
27
-
27
+
28
28
  };
29
29
 
30
30
  })( jQuery );
@@ -14,11 +14,11 @@
14
14
  // Helps us determine if the current modal is being queued for display.
15
15
  //
16
16
  var modalQueued = false;
17
-
17
+
18
18
  //
19
19
  // Bind the live 'click' event to all anchor elemnets with the data-reveal-id attribute.
20
20
  //
21
- $( 'a[data-reveal-id]' ).live( 'click', function ( event ) {
21
+ $(document).on('click', 'a[data-reveal-id]', function ( event ) {
22
22
  //
23
23
  // Prevent default action of the event.
24
24
  //
@@ -219,11 +219,11 @@
219
219
  //
220
220
  modalBg.fadeTo( 'fast', 0.8 );
221
221
  }
222
-
222
+
223
223
  //
224
224
  // Helper Methods
225
225
  //
226
-
226
+
227
227
  /**
228
228
  * Unlock the modal for animation.
229
229
  *
@@ -241,7 +241,7 @@
241
241
  function lockModal() {
242
242
  locked = true;
243
243
  }
244
-
244
+
245
245
  /**
246
246
  * Closes all open modals.
247
247
  *
@@ -265,7 +265,7 @@
265
265
  //
266
266
  $openModals.trigger( "reveal:close" );
267
267
  }
268
-
268
+
269
269
  }
270
270
  /**
271
271
  * Animates the modal opening.
@@ -316,7 +316,7 @@
316
316
  // So, faster than the modal element.
317
317
  //
318
318
  modalBg.fadeIn( options.animationSpeed / 2 );
319
-
319
+
320
320
  //
321
321
  // Let's delay the next animation queue.
322
322
  // We'll wait until the background element is faded in.
@@ -349,7 +349,7 @@
349
349
  // This should trigger the functions set in the options.opened property.
350
350
  //
351
351
  modal.trigger( 'reveal:opened' );
352
-
352
+
353
353
  }); // end of animate.
354
354
 
355
355
  } // end if 'fadeAndPop'
@@ -406,7 +406,7 @@
406
406
  // This should trigger the functions set in the options.opened property.
407
407
  //
408
408
  modal.trigger( 'reveal:opened' );
409
-
409
+
410
410
  });
411
411
 
412
412
  } // end if 'fade'
@@ -439,11 +439,11 @@
439
439
  // Trigger the modal opened event.
440
440
  //
441
441
  modal.trigger( 'reveal:opened' );
442
-
442
+
443
443
  } // end if animating 'none'
444
-
444
+
445
445
  }// end if !locked
446
-
446
+
447
447
  }// end openAnimation
448
448
 
449
449
  //
@@ -489,7 +489,7 @@
489
489
  // Fade the modal out, by using the opacity property.
490
490
  //
491
491
  "opacity": 0
492
-
492
+
493
493
  },
494
494
  /*
495
495
  * Fade speed.
@@ -503,7 +503,7 @@
503
503
  // Set the css hidden options.
504
504
  //
505
505
  modal.css( cssOpts.close );
506
-
506
+
507
507
  });
508
508
  //
509
509
  // Is the modal animation queued?
@@ -541,13 +541,13 @@
541
541
  // This should trigger any method set in the options.closed propety.
542
542
  //
543
543
  modal.trigger( 'reveal:closed' );
544
-
544
+
545
545
  } // end if !modalQueued
546
546
  //
547
547
  // Reset the modalQueued variable.
548
548
  //
549
549
  modalQueued = false;
550
-
550
+
551
551
  } // end if animation 'fadeAndPop'
552
552
 
553
553
  //
@@ -609,9 +609,9 @@
609
609
  // This should trigger any method set in the options.closed propety.
610
610
  //
611
611
  modal.trigger( 'reveal:closed' );
612
-
612
+
613
613
  } // end if !modalQueued
614
-
614
+
615
615
  } // end if animation 'fade'
616
616
 
617
617
  //
@@ -637,11 +637,11 @@
637
637
  // This should trigger any method set in the options.closed propety.
638
638
  //
639
639
  modal.trigger( 'reveal:closed' );
640
-
640
+
641
641
  } // end if not animating
642
642
 
643
643
  } // end if !locked
644
-
644
+
645
645
  } // end closeAnimation
646
646
 
647
647
  /**
@@ -666,7 +666,7 @@
666
666
  // Unbind all .reveal events from the body.
667
667
  //
668
668
  $( 'body' ).unbind( '.reveal' );
669
-
669
+
670
670
  }
671
671
 
672
672
  //
@@ -703,7 +703,7 @@
703
703
  // Handled by the options.closed property function.
704
704
  //
705
705
  modal.bind( 'reveal:closed.reveal', options.closed );
706
-
706
+
707
707
  //
708
708
  // We're running this for the first time.
709
709
  // Trigger the modal 'open' event.
@@ -724,7 +724,7 @@
724
724
  modal.trigger( 'reveal:close' );
725
725
 
726
726
  });
727
-
727
+
728
728
  //
729
729
  // Should we close the modal background on click?
730
730
  //
@@ -743,9 +743,9 @@
743
743
  // Trigger the modal 'close' event.
744
744
  //
745
745
  modal.trigger( 'reveal:close' );
746
-
746
+
747
747
  });
748
-
748
+
749
749
  }
750
750
 
751
751
  //
@@ -763,11 +763,11 @@
763
763
  //
764
764
  modal.trigger( 'reveal:close' );
765
765
  }
766
-
766
+
767
767
  }); // end $(body)
768
768
 
769
769
  }); // end this.each
770
-
770
+
771
771
  }; // end $.fn
772
772
 
773
773
  } ( jQuery ) );
@@ -1,11 +1,11 @@
1
1
  (function ($) {
2
-
2
+
3
3
  $.fn.foundationTabs = function (options) {
4
-
4
+
5
5
  var settings = $.extend({
6
6
  callback: $.noop
7
7
  }, options);
8
-
8
+
9
9
  var activateTab = function ($tab) {
10
10
  var $activeTab = $tab.closest('dl').find('dd.active'),
11
11
  contentLocation = $tab.children('a').attr("href") + 'Tab';
@@ -21,16 +21,16 @@
21
21
  $(contentLocation).closest('.tabs-content').children('li').removeClass('active').hide();
22
22
  $(contentLocation).css('display', 'block').addClass('active');
23
23
  };
24
-
25
- $('dl.tabs dd a', this).on('click.fndtn', function (event){
24
+
25
+ $(document).on('click.fndtn', 'dl.tabs dd a', function (event){
26
26
  activateTab($(this).parent('dd'));
27
27
  });
28
-
28
+
29
29
  if (window.location.hash) {
30
30
  activateTab($('a[href="' + window.location.hash + '"]').parent('dd'));
31
31
  settings.callback();
32
32
  }
33
-
33
+
34
34
  };
35
35
 
36
36
  })(jQuery);
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zurb-foundation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8.rc1
5
- prerelease: 6
4
+ version: 3.0.8
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - ZURB
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-08 00:00:00.000000000 Z
12
+ date: 2012-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: compass
@@ -43,6 +43,22 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: 3.2.0.alpha.244
46
+ - !ruby/object:Gem::Dependency
47
+ name: modular-scale
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: rake
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -90,6 +106,7 @@ files:
90
106
  - scss/foundation/common/_base.scss
91
107
  - scss/foundation/common/_forms.scss
92
108
  - scss/foundation/common/_globals.scss
109
+ - scss/foundation/common/_ratios.scss
93
110
  - scss/foundation/common/_typography.scss
94
111
  - scss/foundation/components/_grid.scss
95
112
  - scss/foundation/components/modules/_all.scss
@@ -103,7 +120,6 @@ files:
103
120
  - scss/foundation/functions/_all.scss
104
121
  - scss/foundation/functions/_convert-number-to-word.scss
105
122
  - scss/foundation/functions/_grid-calc.scss
106
- - scss/foundation/functions/_modular-scale.sass
107
123
  - scss/foundation/mixins/_all.scss
108
124
  - scss/foundation/mixins/_clearfix.scss
109
125
  - scss/foundation/mixins/_css-triangle.scss
@@ -177,13 +193,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
193
  version: '0'
178
194
  segments:
179
195
  - 0
180
- hash: 3263140076592270617
196
+ hash: 2494856150602114202
181
197
  required_rubygems_version: !ruby/object:Gem::Requirement
182
198
  none: false
183
199
  requirements:
184
- - - ! '>'
200
+ - - ! '>='
185
201
  - !ruby/object:Gem::Version
186
- version: 1.3.1
202
+ version: '0'
203
+ segments:
204
+ - 0
205
+ hash: 2494856150602114202
187
206
  requirements: []
188
207
  rubyforge_project:
189
208
  rubygems_version: 1.8.23
@@ -1,332 +0,0 @@
1
- // SASSY MODULAR-SCALE
2
- // https://github.com/scottkellum/modular-scale
3
-
4
- @charset "UTF-8"
5
-
6
- // Ratios
7
- $golden: 1.618
8
- $gold: $golden
9
- $double-octave: (4 / 1)
10
- $major-twelfth: (3 / 1)
11
- $major-eleventh: (8 / 3)
12
- $major-tenth: (5 / 2)
13
- $octave: (2 / 1)
14
- $major-seventh: (15 / 8)
15
- $minor-seventh: (16 / 9)
16
- $major-sixth: (5 / 3)
17
- $minor-sixth: (8 / 5)
18
- $fifth: (3 / 2)
19
- $augfourth: (1 / 1.4142135623730950488) // (1 / square root 2)
20
- $fourth: (4 / 3)
21
- $major-third: (5 / 4)
22
- $minor-third: (6 / 5)
23
- $major-second: (9 / 8)
24
- $minor-second: (16 / 15)
25
-
26
- // Defaults
27
- // $ratio: $golden !default
28
- // $base-size: 16px !default
29
- $property: font-size !default
30
- $class-slug: ms !default
31
-
32
- // Modular Scale function
33
- @function modular-scale($multiple, $base-size, $ratio)
34
- // return the $base-size if $multiple is zero
35
- @if $multiple == 0
36
- @if type-of($base-size) == 'list'
37
- $base-size: sort-list($base-size)
38
- @return nth($base-size, 1)
39
- // return just the simple $base-size value if it's not a list
40
- @return $base-size
41
-
42
- // if multiple base-sizes are passed in as a list
43
- // and multiple ratios are passed in as a list
44
- // calculate values in using each base-size / ratio combination
45
- @if type-of($base-size) == 'list' and type-of($ratio) == 'list'
46
- @if unit(ms-multibase-multiratio($multiple, $base-size, $ratio)) == 'px'
47
- @return round(ms-multibase-multiratio($multiple, $base-size, $ratio))
48
- @return ms-multibase-multiratio($multiple, $base-size, $ratio)
49
-
50
- // if multiple base-sizes are passed in as a list
51
- // calculate values in using each base-size
52
- @if type-of($base-size) == 'list' and type-of($ratio) == 'number'
53
- @if unit(ms-multibase($multiple, $base-size, $ratio)) == 'px'
54
- @return round(ms-multibase($multiple, $base-size, $ratio))
55
- @return ms-multibase($multiple, $base-size, $ratio)
56
-
57
- // if multiple ratios are passed in as a list
58
- // calculate values in using each ratio
59
- @if type-of($base-size) == 'number' and type-of($ratio) == 'list'
60
- @if unit(ms-multiratio($multiple, $base-size, $ratio)) == 'px'
61
- @return round(ms-multiratio($multiple, $base-size, $ratio))
62
- @return ms-multiratio($multiple, $base-size, $ratio)
63
-
64
- // If there are no lists just run the simple function
65
- @if unit(exponent($ratio, $multiple) * $base-size) == 'px'
66
- @return round(exponent($ratio, $multiple) * $base-size)
67
- @return exponent($ratio, $multiple) * $base-size
68
-
69
-
70
- // calculate values in using each base-size / ratio combination
71
- @function ms-multibase-multiratio($multiple, $base-size, $ratio)
72
- // start with an empty list to place all values in
73
- $scale-values: ()
74
- // make sure base sizes are in ascending order
75
- $base-size: sort-list($base-size)
76
- // take each base-size in turn
77
- $k: 1
78
- @while $k <= length($base-size)
79
- // add each $base-size to the list except the first
80
- @if $k > 1
81
- $scale-values: append($scale-values, nth($base-size, $k))
82
- // take each ratio in turn
83
- $j: 1
84
- @while $j <= length($ratio)
85
- // reset $modular-scale for each set
86
- $modular-scale: nth($base-size, $k)
87
- // do the scale for each base-size using this ratio
88
- @if $multiple > 0
89
- // up $multiple times
90
- // and add the result to $scale-values
91
- @for $i from 1 through $multiple
92
- $modular-scale: exponent(nth($ratio, $j), $i) * nth($base-size, $k)
93
- $scale-values: append($scale-values, $modular-scale)
94
- // and down until the value is lower than the lowest $base-size
95
- // and add the result to $scale-values
96
- $i: -1
97
- $modular-scale: nth($base-size, $k)
98
- @while $modular-scale >= nth($base-size, 1)
99
- $modular-scale: exponent(nth($ratio, $j), $i) * nth($base-size, $k)
100
- $scale-values: append($scale-values, $modular-scale)
101
- $i: $i - 1
102
- @if $multiple < 0
103
- // do the scale down for each set to below 1px
104
- $i: -1
105
- $modular-scale: nth($base-size, $k)
106
- @while $modular-scale > 1
107
- $modular-scale: exponent(nth($ratio, $j), $i) * nth($base-size, $k)
108
- $scale-values: append($scale-values, $modular-scale)
109
- $i: $i - 1
110
- $j: $j + 1
111
- $k: $k + 1
112
- // return trimmed and sorted final list
113
- @return trim-sort($multiple, $scale-values, $base-size)
114
-
115
-
116
- // calculate values in using each base-size
117
- @function ms-multibase($multiple, $base-size, $ratio)
118
- // start with an empty list to place all values in
119
- $scale-values: ()
120
- // make sure base sizes are in ascending order
121
- $base-size: sort-list($base-size)
122
- // take each base-size in turn
123
- $k: 1
124
- @while $k <= length($base-size)
125
- // add each $base-size to the list except the first
126
- @if $k > 1
127
- $scale-values: append($scale-values, nth($base-size, $k))
128
- // reset $modular-scale for each set
129
- $modular-scale: nth($base-size, $k)
130
- // do the scale for each base-size using this ratio
131
- @if $multiple > 0
132
- // up $multiple times
133
- // and add the result to $scale-values
134
- @for $i from 1 through $multiple
135
- $modular-scale: exponent($ratio, $i) * nth($base-size, $k)
136
- $scale-values: append($scale-values, $modular-scale)
137
- // and down until the value is lower than the lowest $base-size
138
- // and add the result to $scale-values
139
- $i: -1
140
- $modular-scale: nth($base-size, $k)
141
- @while $modular-scale >= nth($base-size, 1)
142
- $modular-scale: exponent($ratio, $i) * nth($base-size, $k)
143
- $scale-values: append($scale-values, $modular-scale)
144
- $i: $i - 1
145
- @if $multiple < 0
146
- // do the scale down for each set to below 1px
147
- $i: -1
148
- $modular-scale: nth($base-size, $k)
149
- @while $modular-scale > 1
150
- $modular-scale: exponent($ratio, $i) * nth($base-size, $k)
151
- $scale-values: append($scale-values, $modular-scale)
152
- $i: $i - 1
153
- $k: $k + 1
154
- // return trimmed and sorted final list
155
- @return trim-sort($multiple, $scale-values, $base-size)
156
-
157
-
158
- // calculate values in using each ratio
159
- @function ms-multiratio($multiple, $base-size, $ratio)
160
- // start with an empty list to place all values in
161
- $scale-values: ()
162
- // If $multiple is a positive integer (up the scale)
163
- @if $multiple > 0
164
- // take each ratio in turn
165
- $j: 1
166
- @while $j <= length($ratio)
167
- // reset $modular-scale for each set
168
- $modular-scale: $base-size
169
- // do the scale using this ratio thru the multiple, and add the result to $scale-values
170
- @for $i from 1 through $multiple
171
- $modular-scale: exponent(nth($ratio, $j), $i) * $base-size
172
- $scale-values: append($scale-values, $modular-scale)
173
- $j: $j + 1
174
- // sort acsending
175
- $scale-values: sort-list($scale-values)
176
- // return the final value using the laced list
177
- @return nth($scale-values, $multiple)
178
- // If $multiple is a negative integer (down the scale)
179
- @if $multiple < 0
180
- // take each ratio in turn
181
- $j: 1
182
- @while $j <= length($ratio)
183
- // reset $modular-scale for each set
184
- $modular-scale: $base-size
185
- // do the scale using this ratio thru the multiple, and add the result to $scale-values
186
- @for $i from 1 through ($multiple * -1)
187
- $modular-scale: exponent(nth($ratio, $j), -$i) * $base-size
188
- $scale-values: append($scale-values, $modular-scale)
189
- $j: $j + 1
190
- // sort decending
191
- $scale-values: sort-list($scale-values, 'dec')
192
- // return the final value using the laced list
193
- @return nth($scale-values, $multiple * -1)
194
-
195
-
196
- // trim and sort the final list
197
- @function trim-sort($multiple, $scale-values, $base-size)
198
- @if $multiple > 0
199
- // trim list so we can count from the lowest $base-size
200
- $scale-values: trim-list($scale-values, nth($base-size, 1))
201
- // sort acsending
202
- $scale-values: sort-list($scale-values)
203
- // return the final value using the laced list
204
- @return nth($scale-values, $multiple)
205
- @else
206
- // trim list so we can count from the lowest $base-size
207
- $scale-values: trim-list($scale-values, nth($base-size, 1), 'dec')
208
- // sort acsending
209
- $scale-values: sort-list($scale-values, 'dec')
210
- // return the final value using the laced list
211
- @return nth($scale-values, -$multiple)
212
-
213
-
214
- /////////////////////////////////////////////////////////////////////////
215
-
216
- // Shortcut
217
- @function ms($multiple, $base-size, $ratio)
218
- // Return the value from the Modular Scale function
219
- @return modular-scale($multiple, $base-size, $ratio)
220
-
221
- // Classes Mixin
222
- =modular-scale-classes($multiple, $property, $class-slug, $base-size, $ratio)
223
-
224
- // Loop from 0 through the value of $multiple and generate a range of classes
225
- @for $i from 0 through $multiple
226
- .#{$class-slug}-#{$i}
227
- // Print the $property and return the value from the Modular Scale function
228
- #{$property}: modular-scale($i, $base-size, $ratio)
229
-
230
- =ms-classes($multiple, $property, $class-slug, $base-size, $ratio)
231
- +modular-scale-classes($multiple, $property, $class-slug, $base-size, $ratio)
232
-
233
- // Write Modular Scale List
234
- @function modular-scale-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
235
- $ms-list: unquote("MS-LIST:")
236
- @for $i from $start through $finish
237
- $ms-list: append($ms-list, ms($i, $base-size, $ratio))
238
- @return $ms-list
239
-
240
- @function ms-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
241
- @return modular-scale-list($start, $finish, $base-size, $ratio)
242
-
243
- =modular-scale-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
244
- @debug modular-scale-list($start, $finish, $base-size, $ratio)
245
-
246
- =ms-list($start: 0, $finish: 20, $base-size: $base-size, $ratio: $ratio)
247
- @debug modular-scale-list($start, $finish, $base-size, $ratio)
248
-
249
- /////////////////////////////////////////////////////////////////////////
250
-
251
-
252
- // Sass exponent support
253
- @function exponent($base, $exponent)
254
- // reset value
255
- $value: $base
256
- // positive intergers get multiplied
257
- @if $exponent > 1
258
- @for $i from 2 through $exponent
259
- $value: $value * $base
260
- // negitive intergers get divided. A number divided by itself is 1
261
- @if $exponent < 1
262
- @for $i from 0 through -$exponent
263
- $value: $value / $base
264
- // return the last value written
265
- @return $value
266
-
267
-
268
- // Sass list sorting support
269
- @function sort-list($list, $dir: 'asc')
270
- // built-in list sorting in Sass would make this go away.
271
- // declare some empty lists to put our new order and temporary values
272
- $new-order: ()
273
- $temp: ()
274
- // fill $temp with the contents of $list
275
- $temp: join($temp, $list)
276
- // if sorting ascending
277
- @if $dir == 'asc'
278
- // loop through all values in $list
279
- @for $i from 1 through length($list)
280
- // impossibly high starter value to compare
281
- $low: 1000000
282
- // check for lowest value in $temp
283
- @for $j from 1 through length($temp)
284
- @if nth($temp, $j) < $low
285
- $low: nth($temp, $j)
286
- // add lowest value to $new-order
287
- $new-order: append($new-order, $low)
288
- // empty $temp for the next comparison
289
- $temp: ()
290
- // re-populate $temp with remaining values to sort
291
- @for $k from 1 through length($list)
292
- @if nth($list, $k) > $low
293
- $temp: append($temp, nth($list, $k))
294
- @if $dir == 'dec'
295
- // loop through all values in $list
296
- @for $i from 1 through length($list)
297
- // 0 starter value
298
- $high: 0
299
- // check for highest value in $temp
300
- @for $j from 1 through length($temp)
301
- @if nth($temp, $j) > $high
302
- $high: nth($temp, $j)
303
- $new-order: append($new-order, $high)
304
- // empty $temp for the next comparison
305
- $temp: ()
306
- // re-populate $temp with remaining values to sort
307
- @for $k from 1 through length($list)
308
- @if nth($list, $k) < $high
309
- $temp: append($temp, nth($list, $k))
310
- @return $new-order
311
-
312
-
313
- // Sass list trimming support
314
- @function trim-list($list, $start, $dir: 'asc')
315
- // built-in list trimming in Sass would make this go away.
316
- // declare some empty lists to put our trimmed values
317
- $trimmed: ()
318
- // if sorting ascending
319
- @if $dir == 'asc'
320
- // loop through all values in $list
321
- @for $i from 1 through length($list)
322
- @if nth($list, $i) >= $start
323
- $trimmed: append($trimmed, nth($list, $i))
324
- @if $dir == 'dec'
325
- // loop through all values in $list
326
- @for $i from 1 through length($list)
327
- @if nth($list, $i) <= $start
328
- $trimmed: append($trimmed, nth($list, $i))
329
- @return $trimmed
330
-
331
- // Other libraries can easily query if this function is avalible
332
- $modular-scale-loaded: true