neat 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +0 -1
  3. data/.scss-lint.yml +175 -0
  4. data/.travis.yml +4 -0
  5. data/{LICENSE → LICENSE.md} +8 -10
  6. data/README.md +36 -48
  7. data/app/assets/stylesheets/_neat.scss +4 -4
  8. data/app/assets/stylesheets/functions/_new-breakpoint.scss +4 -4
  9. data/app/assets/stylesheets/functions/_private.scss +10 -4
  10. data/app/assets/stylesheets/grid/_box-sizing.scss +5 -1
  11. data/app/assets/stylesheets/grid/_direction-context.scss +3 -1
  12. data/app/assets/stylesheets/grid/_display-context.scss +3 -1
  13. data/app/assets/stylesheets/grid/_fill-parent.scss +2 -0
  14. data/app/assets/stylesheets/grid/_media.scss +7 -7
  15. data/app/assets/stylesheets/grid/_omega.scss +6 -10
  16. data/app/assets/stylesheets/grid/_outer-container.scss +2 -0
  17. data/app/assets/stylesheets/grid/_pad.scss +2 -0
  18. data/app/assets/stylesheets/grid/_row.scss +3 -4
  19. data/app/assets/stylesheets/grid/_shift.scss +2 -0
  20. data/app/assets/stylesheets/grid/_span-columns.scss +2 -0
  21. data/app/assets/stylesheets/grid/_to-deprecate.scss +7 -15
  22. data/app/assets/stylesheets/grid/_visual-grid.scss +5 -3
  23. data/app/assets/stylesheets/settings/_disable-warnings.scss +2 -0
  24. data/app/assets/stylesheets/settings/_grid.scss +2 -0
  25. data/app/assets/stylesheets/settings/_visual-grid.scss +3 -1
  26. data/bower.json +0 -1
  27. data/lib/neat/version.rb +1 -1
  28. data/neat.gemspec +8 -6
  29. data/spec/neat/columns_spec.rb +15 -15
  30. data/spec/neat/container_spec.rb +4 -4
  31. data/spec/neat/default_spec.rb +5 -5
  32. data/spec/neat/direction_spec.rb +3 -3
  33. data/spec/neat/display_spec.rb +3 -3
  34. data/spec/neat/media_spec.rb +10 -10
  35. data/spec/neat/new_breakpoint_spec.rb +3 -3
  36. data/spec/neat/omega_spec.rb +7 -7
  37. data/spec/neat/pad_spec.rb +5 -5
  38. data/spec/neat/row_spec.rb +7 -7
  39. data/spec/neat/shift_spec.rb +7 -7
  40. data/spec/spec_helper.rb +5 -5
  41. data/spec/support/bourbon_support.rb +2 -2
  42. data/spec/support/matchers/have_rule.rb +1 -1
  43. data/spec/support/matchers/have_value.rb +2 -2
  44. data/spec/support/sass_support.rb +2 -2
  45. metadata +24 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db2a532bbbdb4620bed5cec00f5cd12415dba74c
4
- data.tar.gz: ef585a637c353915fc522398898eb8405972c650
3
+ metadata.gz: 140d19e99dfae421bf4d9202ae2a9de3e5186ed7
4
+ data.tar.gz: 0c943505c573d7661d2f9d4cc3bebfd47f4d1733
5
5
  SHA512:
6
- metadata.gz: fed84c2941a6d114a2c9465fcdfb154a48ba720ff1730d8f26a6965b423e60bdfd67c7f29f02d1aabedda9faa1d5db855715a7b4cc0cdfed957831b9b8c1b010
7
- data.tar.gz: 8312d8b07774daad044001744440db8136c8f567cb272535ea1402107bbb4b7797d64867952199ed15d1036f5e6b9c146d937ce4ca754150b1a97ee50c64ce24
6
+ metadata.gz: 24dfbd6d4c546081cb98a487e83a42bf96efebab0411ea7af12d751c8ea2b7dacd4b61bf4094de86c3b8471fd2227fb04ef4d57bcce42e2e44d421fc7e6cbccc
7
+ data.tar.gz: 3c11c77b33e8b4cc8f05efcf408490152b97d88a14f0332e90638c1dfb983f8bf70083918c96facafb39113144ab124d1cafeed4b52a11c4878d25ab79da7c9f
data/.rspec CHANGED
@@ -1,2 +1 @@
1
1
  --color
2
- --format documentation
@@ -0,0 +1,175 @@
1
+ scss_files: "app/assets/stylesheets/**/*.scss"
2
+
3
+ linters:
4
+ BangFormat:
5
+ enabled: true
6
+ space_before_bang: true
7
+ space_after_bang: false
8
+
9
+ BorderZero:
10
+ enabled: false
11
+
12
+ ColorKeyword:
13
+ enabled: true
14
+ severity: warning
15
+
16
+ Comment:
17
+ enabled: true
18
+
19
+ DebugStatement:
20
+ enabled: true
21
+
22
+ DeclarationOrder:
23
+ enabled: true
24
+
25
+ DuplicateProperty:
26
+ enabled: true
27
+
28
+ ElsePlacement:
29
+ enabled: true
30
+ style: same_line
31
+
32
+ EmptyLineBetweenBlocks:
33
+ enabled: true
34
+ ignore_single_line_blocks: true
35
+
36
+ EmptyRule:
37
+ enabled: true
38
+
39
+ FinalNewline:
40
+ enabled: true
41
+ present: true
42
+
43
+ HexLength:
44
+ enabled: false
45
+ style: short
46
+
47
+ HexNotation:
48
+ enabled: true
49
+ style: lowercase
50
+
51
+ HexValidation:
52
+ enabled: true
53
+
54
+ IdWithExtraneousSelector:
55
+ enabled: true
56
+
57
+ ImportPath:
58
+ enabled: true
59
+ leading_underscore: false
60
+ filename_extension: false
61
+
62
+ Indentation:
63
+ enabled: true
64
+ character: space
65
+ width: 2
66
+
67
+ LeadingZero:
68
+ enabled: true
69
+ style: include_zero
70
+
71
+ MergeableSelector:
72
+ enabled: true
73
+ force_nesting: true
74
+
75
+ NameFormat:
76
+ enabled: true
77
+ convention: hyphenated_lowercase
78
+
79
+ NestingDepth:
80
+ enabled: true
81
+ max_depth: 4
82
+ severity: warning
83
+
84
+ PlaceholderInExtend:
85
+ enabled: false
86
+
87
+ PropertySortOrder:
88
+ enabled: true
89
+ ignore_unspecified: false
90
+ severity: warning
91
+
92
+ PropertySpelling:
93
+ enabled: true
94
+ extra_properties: []
95
+
96
+ QualifyingElement:
97
+ enabled: true
98
+ allow_with_attribute: false
99
+ allow_with_class: false
100
+ allow_with_id: false
101
+ severity: warning
102
+
103
+ SelectorDepth:
104
+ enabled: true
105
+ max_depth: 2
106
+ severity: warning
107
+
108
+ SelectorFormat:
109
+ enabled: true
110
+ convention: hyphenated_lowercase
111
+
112
+ Shorthand:
113
+ enabled: true
114
+ severity: warning
115
+
116
+ SingleLinePerProperty:
117
+ enabled: true
118
+ allow_single_line_rule_sets: true
119
+
120
+ SingleLinePerSelector:
121
+ enabled: true
122
+
123
+ SpaceAfterComma:
124
+ enabled: true
125
+
126
+ SpaceAfterPropertyColon:
127
+ enabled: true
128
+ style: one_space
129
+
130
+ SpaceAfterPropertyName:
131
+ enabled: true
132
+
133
+ SpaceBeforeBrace:
134
+ enabled: true
135
+ style: space
136
+ allow_single_line_padding: false
137
+
138
+ SpaceBetweenParens:
139
+ enabled: true
140
+ spaces: 0
141
+
142
+ StringQuotes:
143
+ enabled: true
144
+ style: double_quotes
145
+
146
+ TrailingSemicolon:
147
+ enabled: true
148
+
149
+ TrailingZero:
150
+ enabled: false
151
+
152
+ UnnecessaryMantissa:
153
+ enabled: true
154
+
155
+ UnnecessaryParentReference:
156
+ enabled: true
157
+
158
+ UrlFormat:
159
+ enabled: true
160
+
161
+ UrlQuotes:
162
+ enabled: true
163
+
164
+ VendorPrefixes:
165
+ enabled: true
166
+ identifier_list: bourbon
167
+ include: []
168
+ exclude: []
169
+
170
+ ZeroUnit:
171
+ enabled: true
172
+ severity: warning
173
+
174
+ Compass::*:
175
+ enabled: false
@@ -1,5 +1,9 @@
1
1
  language: ruby
2
2
  rvm: 2.0.0
3
+ branches:
4
+ except:
5
+ - gh-pages
6
+ - gh-pages-dev
3
7
  notifications:
4
8
  slack:
5
9
  secure: ROE+Zo+A6JmTjxCRGG539YaoEcLrsInEIrTDQMgtn5ucLaiPiau96VO+GJ4MyxZm2M5qlSRMFCxb3jFexCRVZctuUF2hFcXVi6a/+JGhMmYLd6XMNezhlxWwOoSx6ufSAlrlXEalsdnkzqVHuH2Y50ao/3slNo58DdLoaRJiGAc=
@@ -1,23 +1,21 @@
1
- LICENSE
1
+ The MIT License (MIT)
2
2
 
3
- The MIT License
4
-
5
- Copyright (c) 2012-2014 thoughtbot, inc.
3
+ Copyright © 2012–2015 [thoughtbot, inc.](http://thoughtbot.com)
6
4
 
7
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
6
+ of this software and associated documentation files (the Software), to deal
9
7
  in the Software without restriction, including without limitation the rights
10
8
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
9
  copies of the Software, and to permit persons to whom the Software is
12
10
  furnished to do so, subject to the following conditions:
13
11
 
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
16
14
 
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ THE SOFTWARE IS PROVIDED AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,36 +1,36 @@
1
- <img src="http://neat.bourbon.io/images/logotype.svg" width="250" />
1
+ [![Neat](http://images.thoughtbot.com/bourbon/neat-logo.svg)](http://neat.bourbon.io)
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/neat.svg?style=flat)](https://rubygems.org/gems/neat) [![Travis](http://img.shields.io/travis/thoughtbot/neat.svg?style=flat)](https://travis-ci.org/thoughtbot/neat)
4
- [![Code Climate](http://img.shields.io/codeclimate/github/thoughtbot/neat.svg?style=flat)](https://codeclimate.com/github/thoughtbot/neat)
5
- [![IRC](http://img.shields.io/badge/freenode-%23bourbon--neat-ae3dd2.svg?style=flat)](#)
4
+ [![Gitter](http://img.shields.io/badge/gitter-neat-ae3dd2.svg?style=flat)](https://gitter.im/thoughtbot/neat)
6
5
  [![Stack Overflow](http://img.shields.io/badge/stack%20overflow-neat-ae3dd2.svg?style=flat)](http://stackoverflow.com/questions/tagged/neat)
7
6
 
8
- ***
7
+ ## A lightweight, semantic grid framework built with Bourbon
9
8
 
10
- ## A lightweight, semantic grid framework built on top of Bourbon
9
+ Neat is a fluid grid framework built with [Bourbon](https://github.com/thoughtbot/bourbon) with the aim of being easy enough to use out of the box and flexible enough to customize down the road.
11
10
 
12
- Neat is a fluid grid framework built on [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.
13
-
14
- #### [Documentation & Demo](http://neat.bourbon.io)
15
-
16
- #### [Changelog](https://github.com/thoughtbot/neat/releases)
11
+ - **[Demo](http://neat.bourbon.io)**
12
+ - **[Documentation](http://thoughtbot.github.io/neat-docs/latest)**
13
+ - **[Changelog](https://github.com/thoughtbot/neat/releases)**
14
+ - **[Issues & Bugs](https://github.com/thoughtbot/neat/issues)**
17
15
 
18
16
  ## Requirements
19
17
 
20
- - [Sass](https://github.com/sass/sass) 3.3+ ([Use Neat
21
- 1.5.1](#installing-older-versions-of-neat) if you are still tied to Sass 3.2)
22
- - [Bourbon](https://github.com/thoughtbot/bourbon) 3.1+
18
+ - [Sass](https://github.com/sass/sass) 3.3+
19
+ - [Bourbon](https://github.com/thoughtbot/bourbon) 4.0+
20
+ - :warning: If you need **Sass 3.2 support**, you should [use Neat 1.5.1](#installing-older-versions-of-neat)
23
21
 
24
22
  ## Installation
25
23
 
26
- Neat uses the [RubyGems](https://rubygems.org) package manager to easily generate a `neat` directory with all of the necessary files.
24
+ For command line help, visit our wiki page on Neat’s [command line interface](https://github.com/thoughtbot/neat/wiki/Command-Line-Interface).
27
25
 
28
- 1. Install the Neat gem:
26
+ 1. Install the Neat gem using the [RubyGems](https://rubygems.org) package manager:
29
27
 
30
28
  ```bash
31
29
  gem install neat
32
30
  ```
33
31
 
32
+ Alternatively, you can install Neat with [Bower](http://bower.io).
33
+
34
34
  2. Install or update Neat’s dependencies:
35
35
 
36
36
  ```bash
@@ -78,13 +78,24 @@ Neat uses the [RubyGems](https://rubygems.org) package manager to easily generat
78
78
  bundle update sass
79
79
  ```
80
80
 
81
- 3. Import Neat in your `application.css.scss`, after Bourbon:
81
+ 3. Install the Neat library into the current directory:
82
+
83
+ ```bash
84
+ bourbon install # if not already installed
85
+ ```
86
+ ```bash
87
+ neat install
88
+ ```
89
+
90
+ 4. Import Neat in your `application.css.scss`, after Bourbon:
82
91
 
83
92
  ```scss
84
93
  @import "bourbon";
85
94
  @import "neat";
86
95
  ```
87
96
 
97
+ It should be noted that `@import` rules are not compatible with Sprockets directives. You need to use one or the other.
98
+
88
99
  ## Installing older versions of Neat
89
100
 
90
101
  1. Uninstall any Neat gem versions you already have:
@@ -101,16 +112,6 @@ Neat uses the [RubyGems](https://rubygems.org) package manager to easily generat
101
112
 
102
113
  3. Follow the [instructions above](#installation) to install Neat into your project.
103
114
 
104
- ## Command line interface
105
-
106
- ```bash
107
- neat install
108
- neat update
109
- neat remove
110
- ```
111
-
112
- More information can be found in the [wiki](https://github.com/thoughtbot/neat/wiki/Command-Line-Interface).
113
-
114
115
  ## Using Neat
115
116
 
116
117
  First off, if you are planning to override the default grid settings (12 columns), it is recommended to create a `_grid-settings.scss` file for that purpose. Make sure to import it right *before* importing Neat:
@@ -137,7 +138,7 @@ $tablet: new-breakpoint(max-width 768px 8);
137
138
  $mobile: new-breakpoint(max-width 480px 4);
138
139
  ```
139
140
 
140
- See the [docs](http://neat.bourbon.io/docs/#variables) for a full list of settings.
141
+ See the [docs](http://thoughtbot.github.io/neat-docs/latest/#variable) for a full list of settings.
141
142
 
142
143
  Next, include the `outer-container` mixin in the topmost container (to which the `max-width` setting will be applied):
143
144
 
@@ -202,11 +203,9 @@ The visual grid reflects the changes applied to the grid via the `new-breakpoint
202
203
 
203
204
  #### How do I use `omega()` in a mobile-first workflow?
204
205
 
205
- Using `omega()` with an `nth-child` pseudo selector in a mobile-first workflow will cause the style to be applied to wider-viewport media queries as well. That
206
- is the cascading nature of CSS.
206
+ Using `omega()` with an `nth-child` pseudo selector in a mobile-first workflow will cause the style to be applied to wider-viewport media queries as well. That is the cascading nature of CSS.
207
207
 
208
- One solution would be to provide an `omega-reset()` mixin that negates the effect of `omega()` on that specific `nth-child` pseudo selector. While this is
209
- often the most suggested solution, it is also a lazy hack that outputs ugly code and can quickly get out of hand in complex layouts. As a general rule, having to *undo* CSS styles is a sign of poor stylesheet architecture (more about [CSS code smells](http://csswizardry.com/2012/11/code-smells-in-css/)).
208
+ One solution would be to provide an `omega-reset()` mixin that negates the effect of `omega()` on that specific `nth-child` pseudo selector. While this is often the most suggested solution, it is also a lazy hack that outputs ugly code and can quickly get out of hand in complex layouts. As a general rule, having to *undo* CSS styles is a sign of poor stylesheet architecture (more about [CSS code smells](http://csswizardry.com/2012/11/code-smells-in-css/)).
210
209
 
211
210
  The other, more elegant, solution is to use mutually exclusive media queries, also referred to as [media-query
212
211
  splitting](http://simurai.com/blog/2012/08/29/media-query-splitting). This would guarantee that `omega()` styles are only applied where desired.
@@ -244,17 +243,6 @@ At this point, writing an internal rounding mechanism is not high priority.
244
243
 
245
244
  Unless you [open a pull request](https://github.com/thoughtbot/neat/compare/), the answer is most likely going to be no. Neat is lightweight and simple compared to other grid frameworks, and strives to remain so. We have plans for adding new features in future versions of the framework, but these will be most likely to support new ways of working with layouts on the Web, not patches to existing ones.
246
245
 
247
- ## Documentation
248
-
249
- - [Full documentation](http://thoughtbot.github.io/neat-docs/latest/) (latest)
250
- - Neat documentation is now available by default in [Dash](http://kapeli.com/dash)
251
-
252
- ## Links
253
-
254
- - Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/neat). Don’t forget to tag them `bourbon` and `neat`.
255
- - Suggest features or file bugs in [Issues](https://github.com/thoughtbot/neat/issues).
256
- - Join `#bourbon-neat` on `irc.freenode.net`.
257
-
258
246
  ## Browser support
259
247
 
260
248
  - Chrome 4.0+
@@ -266,17 +254,17 @@ Unless you [open a pull request](https://github.com/thoughtbot/neat/compare/), t
266
254
 
267
255
  ## The Bourbon family
268
256
 
269
- - [Bourbon](http://bourbon.io): A simple and lightweight mixin library for Sass
270
- - [Neat](http://neat.bourbon.io): A lightweight semantic grid framework for Sass and Bourbon
271
- - [Bitters](http://bitters.bourbon.io): Scaffold styles, variables and structure for Bourbon projects
272
- - [Refills](http://refills.bourbon.io): Prepackaged patterns and components, built on top of Bourbon, Bitters & Neat
257
+ - [Bourbon](https://github.com/thoughtbot/bourbon): A simple and lightweight mixin library for Sass
258
+ - [Neat](https://github.com/thoughtbot/neat): A lightweight semantic grid framework for Sass and Bourbon
259
+ - [Bitters](https://github.com/thoughtbot/bitters): Scaffold styles, variables and structure for Bourbon projects
260
+ - [Refills](https://github.com/thoughtbot/refills): Prepackaged patterns and components built with Bourbon, Neat and Bitters
273
261
 
274
262
  ## Credits
275
263
 
276
- ![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
264
+ [![thoughtbot](http://images.thoughtbot.com/bourbon/thoughtbot-logo.svg)](http://thoughtbot.com)
277
265
 
278
266
  Neat is maintained and funded by [thoughtbot, inc](http://thoughtbot.com). Tweet your questions or suggestions to [@bourbonsass](https://twitter.com/bourbonsass) and while you’re at it follow us too.
279
267
 
280
268
  ## License
281
269
 
282
- Copyright © 2012–2014 [thoughtbot, inc](http://thoughtbot.com). Neat is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
270
+ Copyright © 2012–2015 [thoughtbot, inc](http://thoughtbot.com). Neat is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
@@ -1,7 +1,7 @@
1
- /* Neat 1.7.0
2
- * http://neat.bourbon.io
3
- * Copyright 2012-2014 thoughtbot, inc.
4
- * MIT License */
1
+ // Neat 1.7.1
2
+ // http://neat.bourbon.io
3
+ // Copyright 2012-2015 thoughtbot, inc.
4
+ // MIT License
5
5
 
6
6
  // Helpers
7
7
  @import "neat-helpers";
@@ -1,3 +1,5 @@
1
+ @charset "UTF-8";
2
+
1
3
  /// Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat.
2
4
  ///
3
5
  /// @param {List} $query
@@ -35,13 +37,11 @@
35
37
  @function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) {
36
38
  @if length($query) == 1 {
37
39
  $query: $default-feature nth($query, 1) $total-columns;
38
- }
39
-
40
- @else if is-even(length($query)) {
40
+ } @else if is-even(length($query)) {
41
41
  $query: append($query, $total-columns);
42
42
  }
43
43
 
44
- @if not belongs-to($query, $visual-grid-breakpoints) {
44
+ @if is-not(belongs-to($query, $visual-grid-breakpoints)) {
45
45
  $visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma) !global;
46
46
  }
47
47
 
@@ -1,15 +1,21 @@
1
+ // Not function for Libsass compatibility
2
+ // https://github.com/sass/libsass/issues/368
3
+ @function is-not($value) {
4
+ @return if($value, false, true);
5
+ }
6
+
1
7
  // Checks if a number is even
2
8
  @function is-even($int) {
3
- @return $int % 2 == 0
9
+ @return $int % 2 == 0;
4
10
  }
5
11
 
6
12
  // Checks if an element belongs to a list or not
7
13
  @function belongs-to($tested-item, $list) {
8
- @return not not-belongs-to($tested-item, $list);
14
+ @return is-not(not-belongs-to($tested-item, $list));
9
15
  }
10
16
 
11
17
  @function not-belongs-to($tested-item, $list) {
12
- @return not index($list, $tested-item);
18
+ @return is-not(index($list, $tested-item));
13
19
  }
14
20
 
15
21
  // Contains display value
@@ -49,7 +55,7 @@
49
55
 
50
56
  // Generates a striped background
51
57
  @function gradient-stops($grid-columns, $color: $visual-grid-color) {
52
- $transparent: rgba(0,0,0,0);
58
+ $transparent: transparent;
53
59
 
54
60
  $column-width: flex-grid(1, $grid-columns);
55
61
  $gutter-width: flex-gutter($grid-columns);