zurb-foundation 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zurb-foundation (4.2.0)
4
+ zurb-foundation (4.2.1)
5
5
  sass (>= 3.2.0)
6
6
 
7
7
  GEM
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 4.2.1- May 31, 2013
2
+ * Add missing `$experimental` Sass variable
3
+ * Bug fixes for top bar in mobile view
4
+ * Retina is now default media query
5
+ * Removes incompatible Zepto function used in custom forms
6
+
7
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.2.0...v4.2.1).
8
+
1
9
  ### 4.2- May 30, 2013
2
10
  * Added new Interchange Plugin for handling responsive images.
3
11
  * Made a variable for the "sticky" class on the top-bar.
@@ -13,16 +13,18 @@
13
13
 
14
14
  <div class="row">
15
15
  <div class="large-12 columns">
16
- <p><img src="../img/demos/interchange/default.jpg" data-interchange="[../img/demos/interchange/default.jpg, (default)], [../img/demos/interchange/smallest.jpg, (screen and (max-width: 568px))], [../img/demos/interchange/small.jpg, (small)], [../img/demos/interchange/med.jpg, (medium)], [../img/demos/interchange/large.jpg, (large)]"></p>
16
+ <p><img style="width: 100%;" src="../img/demos/interchange/smallest.jpg" data-interchange="[../img/demos/interchange/smallest.jpg, (default)], [../img/demos/interchange/smallest.jpg, (screen and (max-width: 568px))], [../img/demos/interchange/small.jpg, (small)], [../img/demos/interchange/med.jpg, (medium)], [../img/demos/interchange/large.jpg, (large)]"></p>
17
17
 
18
18
  <h3>Using <code>data-interchange</code></h3>
19
- <p>The Foundation Interchange component utilizes the <code>data-interchange</code> attribute for specifying your media queries and respect images.</p>
19
+ <p>The Foundation Interchange component utilizes the <code>data-interchange</code> attribute for specifying your media queries and their respective images.</p>
20
20
 
21
21
  <%= code_example '
22
+ <img src="/path/to/default.jpg" data-interchange="[/path/to/default.jpg, (default)], [/path/to/bigger-image.jpg, (large)]">
23
+ <!-- or your own queries -->
22
24
  <img src="/path/to/default.jpg" data-interchange="[/path/to/default.jpg, (only screen and (min-width: 1px))], [/path/to/bigger-image.jpg, (only screen and (min-width: 1280px))]">
23
25
  ', :html %>
24
26
 
25
- <p>Each rule passed to <code>data-interchange</code> is comma delimited and incapsulated in square brackets, and each argument within a rule is also comma delimited. The first parameter is the path to your image, and the second parameter is your media query, surrounded by parenthesis.</p>
27
+ <p>Each rule passed to <code>data-interchange</code> is comma delimited and encapsulated in square brackets, and each argument within a rule is also comma delimited. The first parameter is the path to your image, and the second parameter is your media query, surrounded by parenthesis.</p>
26
28
 
27
29
  <%= code_example '
28
30
  data-interchange="[image_path, (media query)], [image_path, (media query)]"
@@ -30,6 +32,13 @@ data-interchange="[image_path, (media query)], [image_path, (media query)]"
30
32
 
31
33
  <p><strong>The last rule that evaluates to true will be the image that gets loaded.</strong> We recommend that you set your image <code>src</code> to the smallest one, as this will always get loaded.</p>
32
34
 
35
+ <h4>Using Retina Images</h4>
36
+ <p>You can easily include retina images by using a pixel-density media query for that image. You can even combine multiple parameters in the media query if need be. The retina media query would look something like this, but you can also use dpi or other pixel densities as well:</p>
37
+
38
+ <%= code_example '
39
+ data-interchange="[image_path, (screen and only (min-width: 640px) and (-webkit-min-device-pixel-ratio: 2))]"
40
+ ', :html %>
41
+
33
42
  <h3>Named Queries</h3>
34
43
 
35
44
  <p>Interchange has a few built-in shortcuts that correlate with our visibility classes.</p>
@@ -66,6 +75,16 @@ data-interchange="[image_path, (media query)], [image_path, (media query)]"
66
75
  <td>portrait</td>
67
76
  <td><code>only screen and (orientation: portrait)</code></td>
68
77
  </tr>
78
+ <tr>
79
+ <td>retina <small>(4.2.1)</small></td>
80
+ <td><code>only screen and (-webkit-min-device-pixel-ratio: 2),<br>
81
+ only screen and (min--moz-device-pixel-ratio: 2),<br>
82
+ only screen and (-o-min-device-pixel-ratio: 2/1),<br>
83
+ only screen and (min-device-pixel-ratio: 2),<br>
84
+ only screen and (min-resolution: 192dpi),<br>
85
+ only screen and (min-resolution: 2dppx)</code>
86
+ </td>
87
+ </tr>
69
88
  </tbody>
70
89
  </table>
71
90
 
@@ -77,7 +96,7 @@ data-interchange="[image_path, (large)], [image_path, (landscape)]"
77
96
 
78
97
  <h3>Custom Named Queries</h3>
79
98
 
80
- <p>Custom queries can be defined during initialization. You can also override the default queries in this way:</p>
99
+ <p>Custom queries can be defined during initialization and are an easy way to make your queries more readable. You can also override the default queries in this way:</p>
81
100
 
82
101
  <%= code_example "
83
102
  $(document).foundation('interchange', {
@@ -89,7 +108,7 @@ $(document).foundation('interchange', {
89
108
 
90
109
  <h3>Events</h3>
91
110
 
92
- <p>Interchange triggers a <code>replace</code> event when a rule evaluates to true and the image has been replaced.</p>
111
+ <p>Interchange triggers a <code>replace</code> event when a rule evaluates to true and the image has been replaced. This can be useful when you want to change some styles on your page based on which image is loaded.</p>
93
112
 
94
113
  <%= code_example "
95
114
  $(document).on('replace', 'img', function (e, new_path, original_path) {
@@ -209,7 +209,7 @@
209
209
  <a name="clickable"></a>
210
210
  <h4>Clickable Topbar</h4>
211
211
  <p>You can now make the top bar clickable by adding a data-attribute to the nav element. Here's an example:</p>
212
- <nav class="top-bar" data-options="is_hover:false">
212
+ <nav class="top-bar">
213
213
  <ul class="title-area">
214
214
  <!-- Title Area -->
215
215
  <li class="name">
@@ -14,9 +14,9 @@ set :bundle_gemfile, "docs/Gemfile"
14
14
  set :scm, :git
15
15
 
16
16
  foundation1_ip = '166.78.3.108'
17
- foundation2_ip = '166.78.18.29'
17
+ #foundation2_ip = '166.78.18.29'
18
18
 
19
- role :web, foundation1_ip, foundation2_ip
19
+ role :web, foundation1_ip
20
20
 
21
21
  after "deploy:update_code", "deploy:generate_static_site"
22
22
  set :keep_releases, 3
@@ -33,4 +33,4 @@ namespace :deploy do
33
33
 
34
34
  end
35
35
 
36
- require "bundler/capistrano"
36
+ require "bundler/capistrano"
data/docs/index.html.erb CHANGED
@@ -128,7 +128,7 @@
128
128
  </div>
129
129
  <div class="large-4 columns end">
130
130
  <dl>
131
- <dt><h5><a href="components/dropdown.html">Interchange</a></h5></dt>
131
+ <dt><h5><a href="components/interchange.html">Interchange</a></h5></dt>
132
132
  <dd>This plugin let's you load up the appropriate size image based on media queries that you define.</dd>
133
133
  </dl>
134
134
  </div>
data/docs/sass.html.erb CHANGED
@@ -145,20 +145,22 @@
145
145
  <li>run <span class="keystroke">rails g foundation:install</span></li>
146
146
  </ol>
147
147
 
148
- <!-- <h5>Upgrading Foundation Compass projects</h5>
149
- <p><strong>Javascript and Image Updates:</strong> If you already added Foundation to your Compass project or created the project using Foundation in the first place and just want to copy over any updated javascripts/image assets to your project, use the provided <kbd>foundation/upgrade</kbd> pattern below:</p>
148
+ <h5>Upgrading Foundation Compass projects</h5>
149
+ <p><strong>Javascript Updates:</strong> If you already added Foundation to your Compass project or created the project using Foundation in the first place and just want to copy over any updated javascripts/image assets to your project, use the provided <kbd>foundation/upgrade</kbd> pattern below:</p>
150
150
  <ol style="margin-left: 20px;">
151
151
  <li><span class="keystroke">cd /path/to/your-project</span></li>
152
- <li>run <span class="keystroke">compass install -r zurb-foundation foundation/upgrade force</span></li>
152
+ <li>run <span class="keystroke">compass install -r zurb-foundation foundation/upgrade --force</span></li>
153
153
  </ol>
154
154
 
155
155
  <p><strong>Settings file updates:</strong> You can also upgrade Foundation as a whole, which will override the existing Foundation styles and your settings file. So if you've made changes to your settings file and want to make sure your project is on the latest version of Foundation, make sure you backup your settings file before you begin. Alternatively, you can copy/paste the settings from our file and <strong>@import</strong> your own so they don't get erased.</p>
156
+
156
157
  <p>We also recommend creating a <code>foundation-overrides.scss</code> file that you can use for your own specific styles. This will ensure that your styles don't get obliterated upon updating. <strong>We do not recommend directly editing the Foundation files if you plan to upgrade.</strong> To update you project, use the following steps:</p>
158
+
157
159
  <ol style="margin-left: 20px;">
158
160
  <li>Make sure you've updated your system version of the gem or upgrading won't work.</li>
159
161
  <li><span class="keystroke">cd /path/to/your-project</span></li>
160
162
  <li>run <span class="keystroke">compass install -r zurb-foundation foundation</span></li>
161
- </ol> -->
163
+ </ol>
162
164
 
163
165
  <hr>
164
166
 
@@ -1499,38 +1501,33 @@ $topbar-sticky-class: ".sticky";
1499
1501
  ', :css %>
1500
1502
 
1501
1503
 
1502
- <!-- <a name="gui-apps"></a>
1504
+ <a name="gui-apps"></a>
1503
1505
  <h3>Working with GUI applications</h3>
1504
1506
  <h5 class="subheader">We want you to be able to work with Foundation in whatever way you are comfortable and we realize that not all of us are Terminal ninjas. Here's a rundown of some of the popular GUI applications and how to utilize Foundation with them.</h5>
1505
1507
 
1506
1508
  <h5>CodeKit Project</h5>
1507
- <p>We're using a version of Sass and Compass that doesn't come with CodeKit. This means that you'll need to do a couple steps in order to get everything to compile correctly:</p>
1509
+ <p>To work with Codekit, you'll just need to open it up and create a new Foundation project.</p>
1508
1510
  <ol style="margin-left: 20px;">
1509
- <li>First things first, make sure you have the gem installed.</li>
1510
- <li>Run <kbd>[sudo] gem environment</kbd> in the command line, note your gem executables path.</li>
1511
- <li>Go into <strong>Codekit prefs</strong>, click on <strong>Sass/Scss</strong></li>
1512
- <li>Click on <strong>"Use the Sass executable at this path:"</strong></li>
1513
- <li>Navigate to the <strong>bin</strong> folder at the gem path you found earlier.</li>
1514
- <li>Select sass.bin</li>
1515
- <li>Click on <strong>Compass</strong> in the preferences menu.</li>
1516
- <li>Click on <strong>"Use the Compass executable at this path:"</strong></li>
1517
- <li>Navigate to the <strong>bin</strong> folder at the gem path you found earlier.</li>
1518
- <li>Select compass.bin</li>
1519
- <li>Compile to your hearts content.</li>
1511
+ <li>Make sure you have the Foundation gem installed.</li>
1512
+ <li>Create a new directory where you're project will live.</li>
1513
+ <li>Open Terminal and move into that new directory.</li>
1514
+ <li>Run <kbd>compass create -r zurb-foundation --using foundation</kbd></li>
1515
+ <li>Open up CodeKit</li>
1516
+ <li>File > Add Project</li>
1517
+ <li>Choose the new folder that now contains the Foundation files.</li>
1518
+ <li>Start making changes to the SCSS files and Codekit will compile the changes.</li>
1520
1519
  </ol>
1521
1520
 
1522
- <p><strong>Note:</strong> CodeKit does not support adding Foundation as a "framework" through the GUI. You'll need to use the steps above to accomplish this.</p>
1523
-
1524
- <h5>LiveReload</h5>
1525
- <p>While LiveReload works great within CodeKit, it doesn't work well on its own because you can't update it to use your system Sass and Compass directories. Do not use this application to compile Foundation.</p>
1521
+ <!-- <h5>LiveReload</h5>
1522
+ <p>While LiveReload works great within CodeKit, it doesn't work well on its own because you can't update it to use your system Sass and Compass directories. Do not use this application to compile Foundation.</p> -->
1526
1523
 
1527
1524
  <h5>Compass.app</h5>
1528
1525
  <p>Foundation is included with Compass.app.</p>
1529
-
1526
+ <!--
1530
1527
  <h5>Scout</h5>
1531
- <p>This app doesn't have support for updating the version of Sass and Compass that you use so we're not supporting it at this point.</p>
1528
+ <p>This app doesn't have support for updating the version of Sass and Compass that you use so we're not supporting it at this point.</p> -->
1532
1529
 
1533
- <hr> -->
1530
+ <hr>
1534
1531
 
1535
1532
  </div>
1536
1533
 
@@ -4,7 +4,7 @@
4
4
  Foundation.libs.forms = {
5
5
  name: 'forms',
6
6
 
7
- version: '4.2.0',
7
+ version: '4.2.1',
8
8
 
9
9
  cache: {},
10
10
 
@@ -445,7 +445,8 @@
445
445
  var _self = this;
446
446
 
447
447
  // Set all hidden parent elements, including this element.
448
- _self.hidden = $child.parents().addBack().filter(":hidden");
448
+ _self.hidden = $child.parents();
449
+ _self.hidden = _self.hidden.add($child).filter(":hidden");
449
450
 
450
451
  // Loop through all hidden elements.
451
452
  _self.hidden.each(function () {
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.interchange = {
7
7
  name : 'interchange',
8
8
 
9
- version : '4.2.0',
9
+ version : '4.2.1',
10
10
 
11
11
  cache : {},
12
12
 
@@ -19,7 +19,13 @@
19
19
  medium : 'only screen and (min-width: 1280px)',
20
20
  large : 'only screen and (min-width: 1440px)',
21
21
  landscape : 'only screen and (orientation: landscape)',
22
- portrait : 'only screen and (orientation: portrait)'
22
+ portrait : 'only screen and (orientation: portrait)',
23
+ retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),'
24
+ + 'only screen and (min--moz-device-pixel-ratio: 2),'
25
+ + 'only screen and (-o-min-device-pixel-ratio: 2/1),'
26
+ + 'only screen and (min-device-pixel-ratio: 2),'
27
+ + 'only screen and (min-resolution: 192dpi),'
28
+ + 'only screen and (min-resolution: 2dppx)'
23
29
  },
24
30
 
25
31
  directives : {
@@ -1,3 +1,3 @@
1
1
  module Foundation
2
- VERSION = "4.2.0"
2
+ VERSION = "4.2.1"
3
3
  end
@@ -22,7 +22,7 @@ $em-base: 16px !default;
22
22
  }
23
23
 
24
24
  // Change whether or not you include browser prefixes
25
- $experimental: true !default;
25
+ // $experimental: true;
26
26
 
27
27
  // Various global styles
28
28
 
@@ -2,6 +2,8 @@
2
2
  // Global Foundation Mixins
3
3
  //
4
4
 
5
+ $experimental: true !default;
6
+
5
7
  // We use this to control border radius.
6
8
  @mixin radius($radius:$global-radius) {
7
9
  @if $radius {
@@ -218,7 +218,7 @@ $topbar-sticky-class: ".sticky" !default;
218
218
  width: 100%;
219
219
  height: auto;
220
220
  display: block;
221
- background: $topbar-bg;
221
+ background: $topbar-dropdown-bg;
222
222
  font-size: $em-base;
223
223
  margin: 0;
224
224
  }
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.0
4
+ version: 4.2.1
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-05-30 00:00:00.000000000 Z
12
+ date: 2013-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
@@ -236,7 +236,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
236
  version: '0'
237
237
  segments:
238
238
  - 0
239
- hash: -3901516274681788208
239
+ hash: -4467022467300233239
240
240
  required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  none: false
242
242
  requirements:
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  version: '0'
246
246
  segments:
247
247
  - 0
248
- hash: -3901516274681788208
248
+ hash: -4467022467300233239
249
249
  requirements: []
250
250
  rubyforge_project:
251
251
  rubygems_version: 1.8.23