neat 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS.md CHANGED
@@ -1,3 +1,7 @@
1
+ 1.0.1 (2012-11-06)
2
+
3
+ * Fix bug where the return type in the `em()` function was a string instead of a number
4
+ * Fix bug related to relative path imports in Rails
1
5
 
2
6
  1.0.0 (2012-10-29)
3
7
 
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- [![Bourbon Neat](http://thoughtbot.com/neat/images/logotype.svg)](http://thoughtbot.com/neat)
1
+ [![Bourbon Neat](http://neat.bourbon.io/images/logotype.svg)](http://thoughtbot.com/neat)
2
2
 
3
- **Neat** is an open source fluid grid framework built on top of [Bourbon](http://thoughtbot.com/bourbon) with the aim of being easy enough to use out of the box and flexible enough to customize down the road.
3
+ **Neat** is an open source fluid grid framework built on top of [Bourbon](http://bourbon.io) with the aim of being easy enough to use out of the box and flexible enough to customize down the road.
4
4
 
5
- Learn more about Neat and why we built it [here](http://thoughtbot.com/neat/).
5
+ Learn more about Neat and why we built it [here](http://neat.bourbon.io).
6
6
 
7
7
  Requirements
8
8
  ===
@@ -11,6 +11,12 @@ Requirements
11
11
 
12
12
  Non-Rails projects
13
13
  ===
14
+ Install/update the dependencies first:
15
+
16
+ ```bash
17
+ gem install sass #or gem update sass
18
+ gem install bourbon #or gem update bourbon
19
+ ```
14
20
  Install Neat:
15
21
 
16
22
  ```bash
@@ -308,7 +314,7 @@ The `media()` mixin allows you to use media-queries to modify both the grid and
308
314
  }
309
315
  ```
310
316
 
311
- You can also use two ```@media``` features at the same time.
317
+ You can also use two `@media` features at the same time.
312
318
 
313
319
  Here is a summary of possible argument combinations:
314
320
 
@@ -366,25 +372,32 @@ The `new-breakpoint` takes the same arguments as `media`.
366
372
 
367
373
  By setting `$visual-grid` to `true`, you can display the base grid in the background (default) or as an overlay. You can even change the color and opacity of the gridlines by overriding the default settings as detailed in the section below. Keep in mind that on Webkit, rounding errors in the fluid grid might result in the overlay being few pixels off.
368
374
 
369
- The visual grid reflects the changes applied to the grid via the `new-breakpoint()` mixin.
375
+ The visual grid reflects the changes applied to the grid via the `new-breakpoint()` mixin, as long as the media contexts are defined *before* importing Neat.
370
376
 
371
377
  ### Changing the defaults
372
378
 
373
- All the default settings in Neat can be overridden in your stylesheets. The only thing you need to keep in mind is that these overrides should occur *before* importing Neat (failing to do so will cause the framework to use the default values):
379
+ All the default settings in Neat can be modified, as long as these overrides occur *before* importing Neat (failing to do so will cause the framework to use the default values). The most straighforward way to achieve this is creating a `_grid-settings.scss` file in the root of your stylesheets folder, then importing it before Neat:
374
380
 
375
381
  ```scss
376
382
  @import "bourbon"; // or "bourbon/bourbon" when not in Rails
377
- @import "my-neat-overrides";
383
+ @import "grid-settings";
378
384
  @import "neat"; // or "neat/neat" when not in Rails
379
385
  ```
380
- You need also to import `neat-helpers` (or `near/neat-helpers` in non-Rails projects) in your stylehseet (`_my-neat-overrides.scss` in the example above) if you want to use helper mixins and functions such as `new-breakpoint()` and `em()`:
386
+
387
+ In your newly created `_grid-settings.scss`:
381
388
 
382
389
  ```scss
383
390
  @import "neat-helpers"; // or "neat/neat-helpers" when not in Rails
384
391
 
392
+ // Change the grid settings
385
393
  $column: 90px;
394
+ $gutter: 30px;
386
395
  $grid-columns: 10;
387
- $mobile: new-breakpoint(max-width 480px 4); // Failing to import neat-helpers will cause this line to throw an error
396
+ $max-width: em(1088);
397
+
398
+ // Define your breakpoints
399
+ $mobile: new-breakpoint(max-width 480px 4);
400
+ $tablet: new-breakpoint(max-width 768px 8);
388
401
  ```
389
402
 
390
403
  Here is the list of the available settings:
@@ -398,7 +411,7 @@ Here is the list of the available settings:
398
411
 
399
412
  #### Visual grid settings
400
413
 
401
- - `$visual-grid`: Show the base grid. Defaults to `false`.
414
+ - `$visual-grid`: Show the base grid when set to `true`. Defaults to `false`.
402
415
  - `$visual-grid-color`: Visual grid color. Defaults to `#EEEEEE`.
403
416
  - `$visual-grid-index`: If set to `front`, the grid is overlaid on the content.
404
417
  - `$visual-grid-opacity`: Visual grid opacity.
@@ -1,2 +1,8 @@
1
- @import "settings/default";
2
- @import "functions/helpers";
1
+ // Functions
2
+ @import "functions/private";
3
+ @import "functions/new-breakpoint";
4
+ @import "functions/px-to-em";
5
+
6
+ // Settings
7
+ @import "settings/grid";
8
+ @import "settings/visual-grid";
@@ -2,9 +2,10 @@
2
2
  // MIT Licensed
3
3
  // Copyright (c) 2011 thoughtbot, inc.
4
4
 
5
- @import "functions/private";
6
- @import "functions/helpers";
7
- @import "settings/default";
5
+ // Helpers
6
+ @import "neat-helpers";
7
+
8
+ // Grid
8
9
  @import "grid/global-variables";
9
10
  @import "grid/grid";
10
11
  @import "grid/visual-grid";
@@ -1,5 +1,3 @@
1
- @import "../private";
2
-
3
1
  @function new-breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) {
4
2
 
5
3
  @if length($query) == 1 {
@@ -1,3 +1,3 @@
1
1
  @function em($pxval, $base: 16) {
2
- @return #{$pxval / $base}em;
2
+ @return ($pxval / $base) * 1em;
3
3
  }
@@ -13,7 +13,6 @@ $fg-max-width: $max-width;
13
13
  @mixin outer-container() {
14
14
  @include clearfix;
15
15
  max-width: $fg-max-width;
16
- text-align: left;
17
16
  margin: {
18
17
  left: auto;
19
18
  right: auto;
@@ -7,7 +7,7 @@
7
7
  background-image: unquote("linear-gradient(left, #{$values})");
8
8
  }
9
9
 
10
- @if $visual-grid == true {
10
+ @if $visual-grid == true or $visual-grid == yes {
11
11
  body:before {
12
12
  content: '';
13
13
  display: inline-block;
data/lib/neat/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neat
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-10-29 00:00:00.000000000 Z
14
+ date: 2012-11-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sass
@@ -97,16 +97,14 @@ files:
97
97
  - Rakefile
98
98
  - app/assets/stylesheets/_neat-helpers.scss
99
99
  - app/assets/stylesheets/_neat.scss
100
- - app/assets/stylesheets/functions/_helpers.scss
100
+ - app/assets/stylesheets/functions/_new-breakpoint.scss
101
101
  - app/assets/stylesheets/functions/_private.scss
102
- - app/assets/stylesheets/functions/helpers/_new-breakpoint.scss
103
- - app/assets/stylesheets/functions/helpers/_px-to-em.scss
102
+ - app/assets/stylesheets/functions/_px-to-em.scss
104
103
  - app/assets/stylesheets/grid/_global-variables.scss
105
104
  - app/assets/stylesheets/grid/_grid.scss
106
105
  - app/assets/stylesheets/grid/_visual-grid.scss
107
- - app/assets/stylesheets/settings/_default.scss
108
- - app/assets/stylesheets/settings/default/_grid.scss
109
- - app/assets/stylesheets/settings/default/_visual-grid.scss
106
+ - app/assets/stylesheets/settings/_grid.scss
107
+ - app/assets/stylesheets/settings/_visual-grid.scss
110
108
  - bin/neat
111
109
  - lib/neat.rb
112
110
  - lib/neat/engine.rb
@@ -1,2 +0,0 @@
1
- @import "helpers/new-breakpoint";
2
- @import "helpers/px-to-em";
@@ -1,3 +0,0 @@
1
- @import "../functions/helpers";
2
- @import "default/grid";
3
- @import "default/visual-grid";