zurb-foundation 4.2.2 → 4.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zurb-foundation (4.2.2)
4
+ zurb-foundation (4.2.3)
5
5
  sass (>= 3.2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -74,6 +74,7 @@ MODX
74
74
  Middleman
75
75
 
76
76
  * [Middleman Skeleton](https://github.com/axyz/middleman-zurb-foundation) by [Andrea Moretti](https://twitter.com/axyz)
77
+ * [Middleman Foundation 4.x Template](https://github.com/mattolson/middleman-zurb-template) by [Matt Olson](http://mattolson.com)
77
78
 
78
79
  Magento
79
80
  * [Magento & Foundation](https://github.com/nandroid/MagentoFoundation) by Nandroid
@@ -93,6 +94,10 @@ Shopify
93
94
 
94
95
  * [Foundationify Shopify Theme](https://github.com/lukebussey/foundationify) by Luke Bussey
95
96
 
97
+ Silverstripe
98
+
99
+ * [Foundation Silverstripe Theme](https://github.com/ryanwachtl/silverstripe-foundation) by [Ryan Wachtl](https://github.com/ryanwachtl)
100
+
96
101
  Orchard
97
102
 
98
103
  * [Foundation Theme for Orchard CMS](https://foundationorchardcms.codeplex.com/)
@@ -1,3 +1,13 @@
1
+ ### 4.2.3- June 26, 2013
2
+ * Made it to where custom switches work inside custom forms.
3
+ * Small update to breadcrumb styling so that defaults don't get overridden.
4
+ * Fixed bugs with height of Top Bar.
5
+ * Added Middleman template to README
6
+ * Fixed a wrong selector in forms.js
7
+ * Bug fixes
8
+
9
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.2.2...v4.2.3).
10
+
1
11
  ### 4.2.2- June 11, 2013
2
12
  * Added touch events to zepto core.
3
13
  * Fixed a topbar scroll issue.
@@ -111,6 +111,6 @@
111
111
 
112
112
  <div class="jobs hide-for-small">
113
113
  <h5>Awesome product jobs:</h5>
114
- <script type="text/javascript" src="http://www.zurb.com/jobs/widgets/jobs.js?limit=3&variation=foundation-sidebar"></script>
114
+ <div id="zurbJobsWidget"></div>
115
115
  <a id="via" href="http://zurbjobs.com">via&nbsp;<span class="jobs-link">ZURBjobs</span></a>
116
116
  </div>
@@ -111,6 +111,6 @@
111
111
 
112
112
  <div class="jobs hide-for-small">
113
113
  <h5>Awesome product jobs:</h5>
114
- <script type="text/javascript" src="http://www.zurb.com/jobs/widgets/jobs.js?limit=3&variation=foundation-sidebar"></script>
114
+ <div id="zurbJobsWidget"></div>
115
115
  <a id="via" href="http://zurbjobs.com">via&nbsp;<span class="jobs-link">ZURBjobs</span></a>
116
116
  </div>
@@ -13,9 +13,7 @@
13
13
 
14
14
  <div class="row">
15
15
  <div class="large-12 columns">
16
-
17
16
  <form class="custom">
18
-
19
17
  <div class="row">
20
18
  <div class="large-4 columns">
21
19
  <label for="radio1"><input name="radio1" type="radio" id="radio1" style="display:none;" CHECKED><span class="custom radio checked"></span> Radio Button 1</label>
@@ -344,7 +344,7 @@
344
344
  <form>
345
345
  <div class="row collapse">
346
346
  <span class="your-prefix-class">Label</span>
347
- <input type="text" class="your-label-class" placeholder="Value">
347
+ <input type="text" class="your-input-class" placeholder="Value">
348
348
  </div>
349
349
  </form>', :html %>
350
350
 
@@ -132,10 +132,11 @@
132
132
  <p>Just like with the CSS, we've made it easy to center the pagination element using the quick mixin.</p>
133
133
 
134
134
  <%= code_example '
135
+ .container-class-name { @include pagination-container(true); }
135
136
  .your-class-name { @include pagination($centered, $base-styles); }
136
137
 
137
- /* Setting this to true will add styles to the parent of your pagination element for centering */
138
- $centered: false
138
+ /* Setting this to true will remove floats on li elements and display them as inline-block */
139
+ $centered: true
139
140
 
140
141
  /* This controls whether or not the base styles come across. Useful when applying the centered option. */
141
142
  $base-style: true
@@ -180,4 +181,4 @@ $pagination-link-current-active-bg: $primary-color;', :css %>
180
181
  <div class="large-3 pull-9 columns">
181
182
  <%= render "_sidebar-components.html.erb" %>
182
183
  </div>
183
- </div>
184
+ </div>
@@ -34,7 +34,7 @@
34
34
  <p>We've included SCSS mixins used to style labels. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_variables.scss">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_thumbs.scss">_thumbs.scss</a> from Github and throw them into a Foundation folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
35
35
 
36
36
  <%= code_example '
37
- @import "foundation/variables", "foundation/components/global", "foundation/components/labels";
37
+ @import "foundation/variables", "foundation/components/global", "foundation/components/thumbs";
38
38
  ', :css %>
39
39
 
40
40
  <h5>Quick Mixin</h5>
@@ -12,7 +12,7 @@
12
12
  <ul class="title-area">
13
13
  <!-- Title Area -->
14
14
  <li class="name">
15
- <h1><a href="/">Top Bar</a></h1>
15
+
16
16
  </li>
17
17
  <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
18
18
  <li class="toggle-topbar menu-icon"><a href=""><span>Menu</span></a></li>
@@ -79,7 +79,7 @@
79
79
  <p>The top bar is a pretty complex piece of magical UI goodness, which makes it really difficult to create a mixin from it. We rely on many presentational classes to accomplish the styles and there's a lot happening in the JS. The top bar is hoverable by default but can be changed to a click event by adding a simple <code>data-options="is_hover:false"</code> to the <code>&lt;nav&gt;</code> element. <a href="#clickable">See an example below</a>.</p>
80
80
 
81
81
  <h5>Basic Needs</h5>
82
- <p>The top bar has four main elements, three of which are needed for proper functionality: <code>ul.title-area</code>, a <code>ul class="right/left</code> element enclosed in a <code>section class="top-bar-section"</code>, and the <code>li.toggle-topbar</code> element that will expand the menu in the mobile layout. <!-- You can leave out the li class="name" as long as you include the .toggle-topbar element. --></p>
82
+ <p>The top bar has four main elements, three of which are needed for proper functionality: <code>ul.title-area</code>, a <code>ul class="right/left</code> element enclosed in a <code>section class="top-bar-section"</code>, and the <code>li.toggle-topbar</code> element that will expand the menu in the mobile layout.</p>
83
83
 
84
84
  <h5>Positioning the Bar</h5>
85
85
  <p>The top bar is built with a single <code>nav</code> element with a class of <code>top-bar</code>. It will take on full-browser width by default. To make the top bar stay fixed as you scroll, wrap it in <code>div class="fixed"</code>. If you want your navigation to be set to your grid width, wrap it in <code>div class="contain-to-grid"</code>. You may use <code>fixed</code> and <code>contain-to-grid</code> together.</p>
@@ -90,6 +90,16 @@
90
90
  <h5>Other Elements</h5>
91
91
  <p>To make this navigation nice and flexible, we've included patterns for elements like buttons, inputs and dividers. To create dividers between your navigation, just add an empty <code>li.divider</code> and you'll get some separation. You can use a small Foundation button in the nav, just include <code>has-form</code> as a class for its parent li. You can include two different input types: search and text. To use these, add a class of search to the parent li.</p>
92
92
 
93
+ <h5>Remove the Title</h5>
94
+ <p>If you want a bar that doesn't include a title, just take out the content within the list item, like so:</p>
95
+ <%= code_example '
96
+ <nav class="top-bar">
97
+ <ul class="title-area">
98
+ <li class="name"><!-- Leave this empty --></li>
99
+ ...
100
+ </ul>
101
+ </nav>', :html %>
102
+
93
103
  <h5>Sticky Top Bar</h5>
94
104
  <p>You may also wrap your top bar in <code>div class="contain-to-grid sticky"</code> and put it anywhere within your markup. When the navigation hits the top of the browser, it will act like the fixed top bar and stick to the top as users continue to scroll. <strong>Note:</strong> If you are using Scss, you can control the default <code>sticky</code> class by adjusting the <code>$topbar-sticky-class</code> variable. <strong>Make sure the JS variable for <code>stickyClass</code> matches whatever class you use in the variable.</strong></p>
95
105
 
@@ -12,9 +12,10 @@
12
12
 
13
13
  .CodeRay pre {
14
14
  margin: 0px;
15
- font-size: .9em;
15
+ font-size: .7em;
16
16
  line-height: 1.4em;
17
- white-space: pre;
17
+ white-space: pre-wrap;
18
+ @media only screen and (min-width: 768px) { font-size: .9em; white-space: pre; }
18
19
  }
19
20
 
20
21
  table.CodeRay { border-collapse: collapse; width: 100%; padding: 2px }
@@ -108,7 +108,7 @@ $(document)
108
108
 
109
109
  <h2>Calling Internal Methods</h2>
110
110
 
111
- <p>Foundation 4 JavaScript allows you call call internal plugin methods by passing the method name as the second argument. This is necessary for plugins like Joyride, since they are not initialized on page load by default.</p>
111
+ <p>Foundation 4 JavaScript allows you call internal plugin methods by passing the method name as the second argument. This is necessary for plugins like Joyride, since they are not initialized on page load by default.</p>
112
112
 
113
113
  <p>This will fire the <code>start</code> method on Joyride:</p>
114
114
 
@@ -128,6 +128,24 @@
128
128
  .foundation();
129
129
  <% end %>
130
130
 
131
+ $.ajax({
132
+ url: '//zurb.com/jobs/widgets/jobs.json?limit=3',
133
+ dataType: 'jsonp',
134
+ success: function(data) {
135
+ var list = $("<ul></ul>");
136
+ $.each(data.jobs, function(idx, job) {
137
+ var item = "<li><a href='"+job.url+"' target='_blank'>" +
138
+ "<span class='positionTitle'>"+job.title+"</span>" +
139
+ "<span class='location'><span class='companyName'>"+job.company_name+"</span> in "+job.location+"</span>" +
140
+ "</a>" +
141
+ "</li>";
142
+ list.append(item);
143
+ });
144
+ // Customize This
145
+ $("#zurbJobsWidget").html(list);
146
+ }
147
+ });
148
+
131
149
  // For Kitchen Sink Page
132
150
  $('#start-jr').on('click', function() {
133
151
  $(document).foundation('joyride','start');
@@ -18,6 +18,7 @@ group :assets do
18
18
  gem 'coffee-rails', '~> 3.2.1'
19
19
  gem 'uglifier', '>= 1.0.3'
20
20
  # Add Foundation Here
21
+ gem 'compass-rails' # you need this or you get an err
21
22
  gem 'zurb-foundation', '~> 4.0.0'
22
23
  end
23
24
  ", :ruby %>
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.forms = {
5
5
  name: 'forms',
6
6
 
7
- version: '4.2.2',
7
+ version: '4.2.3',
8
8
 
9
9
  cache: {},
10
10
 
@@ -63,7 +63,7 @@
63
63
  self.toggle_radio($(this));
64
64
  })
65
65
  .on('change.fndtn.forms', 'form.custom select', function (e, force_refresh) {
66
- if (!$(this).not('[data-customforms="disabled"])')) return;
66
+ if ($(this).is('[data-customforms="disabled"]')) return;
67
67
  self.refresh_custom_select($(this), force_refresh);
68
68
  })
69
69
  .on('click.fndtn.forms', 'form.custom label', function (e) {
@@ -166,7 +166,7 @@ if (typeof jQuery === "undefined" &&
166
166
  window.Foundation = {
167
167
  name : 'Foundation',
168
168
 
169
- version : '4.2.2',
169
+ version : '4.2.3',
170
170
 
171
171
  cache : {},
172
172
 
@@ -267,7 +267,7 @@ if (typeof jQuery === "undefined" &&
267
267
  },
268
268
 
269
269
  random_str : function (length) {
270
- var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split('');
270
+ var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
271
271
 
272
272
  if (!length) {
273
273
  length = Math.floor(Math.random() * chars.length);
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.section = {
7
7
  name: 'section',
8
8
 
9
- version : '4.2.2',
9
+ version : '4.2.3',
10
10
 
11
11
  settings : {
12
12
  deep_linking: false,
@@ -306,6 +306,11 @@
306
306
  if (typeof off === 'boolean') {
307
307
  content.attr('style', '');
308
308
  section.attr('style', '');
309
+
310
+ // Reset the minHeight and maxWidth values (only applicable to
311
+ // vertical tabs)
312
+ content.css('minHeight', '');
313
+ content.css('maxWidth', '');
309
314
  } else {
310
315
  if (self.is_vertical_tabs(section)
311
316
  && !self.small(section)) {
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.topbar = {
7
7
  name : 'topbar',
8
8
 
9
- version : '4.2.2',
9
+ version : '4.2.3',
10
10
 
11
11
  settings : {
12
12
  index : 0,
@@ -86,7 +86,7 @@
86
86
 
87
87
  topbar
88
88
  .toggleClass('expanded')
89
- .css('max-height', '');
89
+ .css('height', '');
90
90
  }
91
91
 
92
92
  if (!topbar.hasClass('expanded')) {
@@ -164,14 +164,14 @@
164
164
  section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
165
165
  }
166
166
 
167
- topbar.css('max-height', self.height($this.siblings('ul')) + self.outerHeight(titlebar, true));
167
+ topbar.css('height', self.outerHeight($this.siblings('ul'), true) + self.outerHeight(titlebar, true));
168
168
  }
169
169
  });
170
170
 
171
171
  $(window).on('resize.fndtn.topbar', function () {
172
172
  if (!self.breakpoint()) {
173
173
  $('.top-bar, [data-topbar]')
174
- .css('max-height', '')
174
+ .css('height', '')
175
175
  .removeClass('expanded')
176
176
  .find('li')
177
177
  .removeClass('hover');
@@ -210,9 +210,9 @@
210
210
  }
211
211
 
212
212
  if (topbar.data('index') === 0) {
213
- topbar.css('max-height', '');
213
+ topbar.css('height', '');
214
214
  } else {
215
- topbar.css('max-height', self.height($previousLevelUl) + self.outerHeight(titlebar, true));
215
+ topbar.css('height', self.outerHeight($previousLevelUl, true) + self.outerHeight(titlebar, true));
216
216
  }
217
217
 
218
218
  setTimeout(function () {
@@ -272,14 +272,20 @@
272
272
  var distance = $(klass).length ? $(klass).offset().top: 0,
273
273
  $window = $(window);
274
274
  var offst = this.outerHeight($('.top-bar'));
275
-
275
+ //Whe resize elements of the page on windows resize. Must recalculate distance
276
+ $(window).resize(function() {
277
+ clearTimeout(t_top);
278
+ t_top = setTimeout (function() {
279
+ distance = $(klass).offset().top;
280
+ },105);
281
+ });
276
282
  $window.scroll(function() {
277
- if ($window.scrollTop() >= (distance)) {
283
+ if ($window.scrollTop() > (distance)) {
278
284
  $(klass).addClass("fixed");
279
285
  $('body').css('padding-top',offst);
280
286
  }
281
287
 
282
- else if ($window.scrollTop() < distance) {
288
+ else if ($window.scrollTop() <= distance) {
283
289
  $(klass).removeClass("fixed");
284
290
  $('body').css('padding-top','0');
285
291
  }
@@ -1,3 +1,3 @@
1
1
  module Foundation
2
- VERSION = "4.2.2"
2
+ VERSION = "4.2.3"
3
3
  end
@@ -1,12 +1,12 @@
1
1
  root = File.join(File.dirname(__FILE__), "..")
2
2
  require "foundation/version"
3
3
 
4
- if defined?(Rails)
4
+ if defined?(Rails::Generators::Base)
5
5
  require "foundation/generators/install_generator"
6
6
  end
7
7
 
8
8
  module Foundation
9
- if defined?(Rails)
9
+ if defined?(Rails::Engine)
10
10
  require "foundation/engine"
11
11
  elsif defined?(Sprockets)
12
12
  require "foundation/sprockets"
@@ -65,6 +65,7 @@ $default-float: left;
65
65
  // $include-html-classes: true;
66
66
  // $include-print-styles: true;
67
67
  // $include-html-global-classes: $include-html-classes;
68
+ // $include-html-inline-list-classes: $include-html-classes;
68
69
  // $include-html-type-classes: $include-html-classes;
69
70
  // $include-html-grid-classes: $include-html-classes;
70
71
  // $include-html-visibility-classes: $include-html-classes;
@@ -56,7 +56,6 @@ $crumb-slash: "/" !default;
56
56
  float: $default-float;
57
57
  font-size: $crumb-font-size;
58
58
  text-transform: $crumb-font-transform;
59
- color: $crumb-font-color;
60
59
 
61
60
  &:hover a, &:focus a { text-decoration: $crumb-link-decor; }
62
61
 
@@ -1,7 +1,7 @@
1
1
  //
2
2
  // Inline List Variables
3
3
  //
4
- $include-html-global-classes: $include-html-classes !default;
4
+ $include-html-inline-list-classes: $include-html-classes !default;
5
5
 
6
6
  // We use this to control the margins and padding of the inline list.
7
7
  $inline-list-top-margin: 0 !default;
@@ -43,11 +43,11 @@ $inline-list-children-display: block !default;
43
43
  }
44
44
 
45
45
 
46
- @if $include-html-global-classes != false {
46
+ @if $include-html-inline-list-classes != false {
47
47
 
48
48
  /* Inline Lists */
49
49
  .inline-list {
50
50
  @include inline-list();
51
51
  }
52
52
 
53
- }
53
+ }
@@ -35,8 +35,47 @@ $pagination-link-current-active-bg: $primary-color !default;
35
35
  // Pagination Mixin
36
36
  //
37
37
 
38
+ // Style the pagination container. Currently only used when centering elements.
39
+ @mixin pagination-container($center:false) {
40
+ @if $center { text-align: center; }
41
+ }
42
+
43
+ // Style unavailable list items
44
+ @mixin pagination-unavailable-item() {
45
+ a {
46
+ cursor: $pagination-link-unavailable-cursor;
47
+ color: $pagination-link-unavailable-font-color;
48
+ }
49
+ &:hover a,
50
+ & a:focus { background: $pagination-link-unavailable-bg-active; }
51
+ }
52
+
53
+ // Style the current list item. Do not assume that the current item has
54
+ // an anchor <a> element.
55
+ @mixin pagination-current-item($has-anchor: true) {
56
+ @if $has-anchor {
57
+ a {
58
+ background: $pagination-link-current-background;
59
+ color: $pagination-link-current-font-color;
60
+ font-weight: $pagination-link-current-font-weight;
61
+ cursor: $pagination-link-current-cursor;
62
+
63
+ &:hover,
64
+ &:focus { background: $pagination-link-current-active-bg; }
65
+ }
66
+ } @else {
67
+ background: $pagination-link-current-background;
68
+ color: $pagination-link-current-font-color;
69
+ font-weight: $pagination-link-current-font-weight;
70
+ cursor: $pagination-link-current-cursor;
71
+
72
+ &:hover,
73
+ &:focus { background: $pagination-link-current-active-bg; }
74
+ }
75
+ }
76
+
38
77
  // We use this mixin to set the properties for the creating Foundation pagination
39
- @mixin pagination($center:false, $base-style:true) {
78
+ @mixin pagination($center:false, $base-style:true, $use-default-classes:true) {
40
79
 
41
80
  @if $base-style {
42
81
  display: block;
@@ -44,8 +83,6 @@ $pagination-link-current-active-bg: $primary-color !default;
44
83
  margin-#{$default-float}: $pagination-margin;
45
84
 
46
85
  li {
47
- display: block;
48
- float: $pagination-li-float;
49
86
  height: $pagination-li-height;
50
87
  color: $pagination-li-font-color;
51
88
  font-size: $pagination-li-font-size;
@@ -60,41 +97,42 @@ $pagination-link-current-active-bg: $primary-color !default;
60
97
  &:hover a,
61
98
  a:focus { background: $pagination-link-active-bg; }
62
99
 
63
- &.unavailable a {
64
- cursor: $pagination-link-unavailable-cursor;
65
- color: $pagination-link-unavailable-font-color;
66
- }
67
-
68
- &.unavailable:hover a, &.unavailable a:focus { background: $pagination-link-unavailable-bg-active; }
69
-
70
- &.current a {
71
- background: $pagination-link-current-background;
72
- color: $pagination-link-current-font-color;
73
- font-weight: $pagination-link-current-font-weight;
74
- cursor: $pagination-link-current-cursor;
75
-
76
- &:hover,
77
- &:focus { background: $pagination-link-current-active-bg; }
100
+ @if $use-default-classes {
101
+ &.unavailable { @include pagination-unavailable-item(); }
102
+ &.current { @include pagination-current-item(); }
78
103
  }
79
104
  }
80
105
  }
81
106
 
82
- @if $center {
83
- & { text-align: center;
84
- ul > li {
85
- float: none;
86
- display: inline-block;
87
- }
107
+ // Left or center align the li elements
108
+ li {
109
+ @if $center {
110
+ float: none;
111
+ display: inline-block;
112
+ } @else {
113
+ float: $pagination-li-float;
114
+ display: block;
88
115
  }
89
116
  }
90
117
  }
91
118
 
119
+ @if $include-html-nav-classes != false {
92
120
 
121
+ // Detach the nested class selectors from the containing
122
+ // ul and div elements in order to support more flexibility
123
+ // for external code that uses the Sass mixins.
93
124
 
125
+ /* Default Pagination */
126
+ ul.pagination {
127
+ @include pagination;
128
+ }
94
129
 
95
- @if $include-html-nav-classes != false {
130
+ /* Pagination centred wrapper */
131
+ .pagination-centered {
132
+ @include pagination-container(true);
96
133
 
97
- /* Pagination */
98
- .pagination { @include pagination; }
99
- .pagination-centered { @include pagination(true,false); }
100
- }
134
+ ul.pagination {
135
+ @include pagination(true, false);
136
+ }
137
+ }
138
+ }
@@ -89,7 +89,7 @@ $switch-label-outline: 1px dotted #888 !default;
89
89
  }
90
90
 
91
91
  // The toggle area for radio switches. We call is a paddle.
92
- & > span {
92
+ span:last-child {
93
93
  position: absolute;
94
94
  top: -1px;
95
95
  #{$default-float}: -1px;
@@ -129,6 +129,11 @@ $switch-label-outline: 1px dotted #888 !default;
129
129
  // http://css-tricks.com/webkit-sibling-bug/
130
130
  @if $experimental { -webkit-animation: webkitSiblingBugfix infinite 1s; }
131
131
 
132
+ form.custom & .hidden-field {
133
+ margin-left: auto;
134
+ position: absolute;
135
+ visibility: visible;
136
+ }
132
137
  }
133
138
 
134
139
  // We use this mixin to create the size styles for switches.
@@ -144,13 +149,13 @@ $switch-label-outline: 1px dotted #888 !default;
144
149
 
145
150
  input {
146
151
  // Move the paddle to the right position
147
- &:first-of-type:checked ~ span {
152
+ &:first-of-type:checked ~ span:last-child {
148
153
  #{$default-float}: 100%;
149
154
  margin-#{$default-float}: emCalc(-$height + 1px);
150
155
  }
151
156
  }
152
157
 
153
- & > span {
158
+ span:last-child {
154
159
  width: emCalc($height);
155
160
  height: emCalc($height);
156
161
  }
@@ -164,7 +169,7 @@ $switch-label-outline: 1px dotted #888 !default;
164
169
  background: $switch-bg;
165
170
  border-color: $switch-border-color;
166
171
 
167
- & > span {
172
+ span:last-child {
168
173
  border-color: darken($paddle-bg, 30%);
169
174
  background: $paddle-bg;
170
175
  @if $experimental {
@@ -188,7 +193,7 @@ $switch-label-outline: 1px dotted #888 !default;
188
193
 
189
194
  &:hover,
190
195
  &:focus {
191
- & > span {
196
+ span:last-child {
192
197
  background: $paddle-bg;
193
198
  @if $experimental {
194
199
  background: -moz-linear-gradient(top, $paddle-bg 0%, darken($paddle-bg, 10%) 100%);
@@ -204,11 +209,11 @@ $switch-label-outline: 1px dotted #888 !default;
204
209
  // Setting up the radius for switches
205
210
  @if $radius == true {
206
211
  @include radius(4px);
207
- & > span { @include radius(3px); }
212
+ span:last-child { @include radius(3px); }
208
213
  }
209
214
  @else if $radius {
210
215
  @include radius($radius);
211
- & > span { @include radius($radius - 1px); }
216
+ span:last-child { @include radius($radius - 1px); }
212
217
  }
213
218
 
214
219
  }
@@ -240,12 +245,12 @@ $switch-label-outline: 1px dotted #888 !default;
240
245
 
241
246
  // Add a radius to the switch
242
247
  &.radius { @include radius(4px);
243
- & > span { @include radius(3px); }
248
+ span:last-child{ @include radius(3px); }
244
249
  }
245
250
 
246
251
  // Make the switch completely round, like a pill
247
252
  &.round { @include radius(1000px);
248
- & > span { @include radius(999px); }
253
+ span:last-child { @include radius(999px); }
249
254
  label { padding: 0 emCalc($switch-label-side-padding + 3px); }
250
255
  }
251
256
 
@@ -243,12 +243,6 @@ $topbar-sticky-class: ".sticky" !default;
243
243
  font-weight: $topbar-link-weight;
244
244
  background: $topbar-dropdown-bg;
245
245
 
246
- &.hover {
247
- background: $topbar-link-bg-hover;
248
- color: $topbar-link-color-hover;
249
- }
250
-
251
-
252
246
  &.button {
253
247
  background: $primary-color;
254
248
  font-size: $topbar-link-font-size;
@@ -277,6 +271,12 @@ $topbar-sticky-class: ".sticky" !default;
277
271
 
278
272
  }
279
273
 
274
+ // Apply the hover link color when it has that class
275
+ &.hover > a {
276
+ background: $topbar-link-bg-hover;
277
+ color: $topbar-link-color-hover;
278
+ }
279
+
280
280
  // Apply the active link color when it has that class
281
281
  &.active > a {
282
282
  background: $topbar-link-bg-active;
@@ -496,9 +496,33 @@ $topbar-sticky-class: ".sticky" !default;
496
496
  li .dropdown { right: 100%; }
497
497
  }
498
498
  }
499
-
500
499
  }
500
+
501
+ // Degrade gracefully when Javascript is disabled. Displays dropdown and changes
502
+ // background & text color on hover.
503
+ .no-js .top-bar-section {
504
+ ul li {
505
+ // Apply the hover link color when it has that class
506
+ &:hover > a {
507
+ background: $topbar-link-bg-hover;
508
+ color: $topbar-link-color-hover;
509
+ }
501
510
 
511
+ // Apply the active link color when it has that class
512
+ &:active > a {
513
+ background: $topbar-link-bg-active;
514
+ color: $topbar-link-color-active;
515
+ }
516
+ }
517
+
518
+ .has-dropdown {
519
+ &:hover {
520
+ & > .dropdown {
521
+ visibility: visible;
522
+ }
523
+ }
524
+ }
525
+ }
502
526
  }
503
527
 
504
528
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zurb-foundation
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.2
4
+ version: 4.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-11 00:00:00.000000000 Z
12
+ date: 2013-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -243,7 +243,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  segments:
245
245
  - 0
246
- hash: -541920394098296033
246
+ hash: 2423571560475878438
247
247
  required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  none: false
249
249
  requirements:
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  version: '0'
253
253
  segments:
254
254
  - 0
255
- hash: -541920394098296033
255
+ hash: 2423571560475878438
256
256
  requirements: []
257
257
  rubyforge_project:
258
258
  rubygems_version: 1.8.23