neat 1.4.0 → 1.5.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -11
- data/app/assets/stylesheets/_neat-helpers.scss +0 -1
- data/app/assets/stylesheets/functions/_private.scss +18 -0
- data/app/assets/stylesheets/grid/_shift.scss +7 -0
- data/app/assets/stylesheets/grid/_span-columns.scss +8 -1
- data/lib/neat/version.rb +1 -1
- data/neat.gemspec +1 -0
- data/spec/neat/columns_spec.rb +12 -2
- data/test/shift.scss +5 -6
- data/test/span-columns.scss +4 -4
- metadata +6 -6
- data/app/assets/stylesheets/functions/_px-to-em.scss +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eb001e3c5e66997a8b161645de5c8e33bc7e665
|
4
|
+
data.tar.gz: f971fa906516e7a0efd59387d8d2e0d708f64ad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e81fe6ea0b7be56e608cd911147d0245ed8a73504966ae9b2b1a85e83a5fd52103a40f598a6367feea1cecf1718b04ff59fb07fcdf2f249904e2f0ebc30aec04
|
7
|
+
data.tar.gz: c79bb4e99673679d5b6ea65e9d65403bd22fb184d014da945b21f62bcf70e02da06ad2fd0add7e1a65b8163a0d5d4825a043c1937d84e431c4539977d2d8a80c
|
data/README.md
CHANGED
@@ -169,21 +169,21 @@ Browser support
|
|
169
169
|
- IE 8 with [selectivizr](http://selectivizr.com) (no `media()` support)
|
170
170
|
|
171
171
|
Links
|
172
|
-
|
172
|
+
=====
|
173
173
|
|
174
|
-
- [
|
175
|
-
- [
|
176
|
-
- [
|
177
|
-
-
|
174
|
+
- Read the [online documentation](http://neat.bourbon.io/docs/).
|
175
|
+
- Add the docset to [Dash](http://kapeli.com/dash) 1.8+ (Preferences **>** Downloads **>** + *Add Docset Feed* **>** `http://neat.bourbon.io/docset/Neat.xml`)
|
176
|
+
- Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/neat+bourbon). Don't forget to tag them`bourbon` and `neat`.
|
177
|
+
- Suggest features or file bugs in [Issues](https://github.com/thoughtbot/neat/issues).
|
178
|
+
- Read the [contribution guidelines](https://github.com/thoughtbot/neat/blob/master/CONTRIBUTING.md).
|
179
|
+
- Say hi to [@kaishin](https://twitter.com/kaishin) and [@kylefiedler](https://twitter.com/kylefiedler).
|
178
180
|
|
179
|
-
Credits
|
180
|
-
===
|
181
181
|
|
182
|
-
|
182
|
+
Credits & License
|
183
|
+
=================
|
183
184
|
|
184
|
-
|
185
|
+
![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
|
185
186
|
|
186
|
-
|
187
|
-
===
|
187
|
+
Bourbon is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/). Follow [@thoughtbot](http://twitter.com/thoughtbot) on Twitter.
|
188
188
|
|
189
189
|
Bourbon Neat is Copyright © 2012-2013 thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
|
@@ -44,6 +44,24 @@
|
|
44
44
|
}
|
45
45
|
}
|
46
46
|
|
47
|
+
@function container-shift($shift: $shift) {
|
48
|
+
$parent-columns: $grid-columns !default;
|
49
|
+
|
50
|
+
@if length($shift) == 3 {
|
51
|
+
$container-columns: nth($shift, 3);
|
52
|
+
@return $container-columns;
|
53
|
+
}
|
54
|
+
|
55
|
+
@else if length($shift) == 2 {
|
56
|
+
$container-columns: nth($shift, 2);
|
57
|
+
@return $container-columns;
|
58
|
+
}
|
59
|
+
|
60
|
+
@else {
|
61
|
+
@return $parent-columns;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
47
65
|
// Generates a striped background
|
48
66
|
@function gradient-stops($grid-columns, $color: $visual-grid-color) {
|
49
67
|
$transparent: rgba(0,0,0,0);
|
@@ -1,4 +1,11 @@
|
|
1
1
|
@mixin shift($n-columns: 1) {
|
2
|
+
@include shift-in-context($n-columns);
|
3
|
+
}
|
4
|
+
|
5
|
+
@mixin shift-in-context($shift: $columns of $container-columns) {
|
6
|
+
$n-columns: nth($shift, 1);
|
7
|
+
$parent-columns: container-shift($shift);
|
8
|
+
|
2
9
|
$direction: get-direction($layout-direction, $default-layout-direction);
|
3
10
|
$opposite-direction: get-opposite-direction($direction);
|
4
11
|
|
@@ -16,10 +16,17 @@
|
|
16
16
|
padding-#{$direction}: $padding;
|
17
17
|
width: flex-grid($columns, $container-columns) + $padding;
|
18
18
|
} @else {
|
19
|
-
display: block;
|
20
19
|
float: #{$opposite-direction};
|
21
20
|
|
21
|
+
@if $display != no-display {
|
22
|
+
display: block;
|
23
|
+
}
|
24
|
+
|
22
25
|
@if $display == collapse {
|
26
|
+
@warn "The 'collapse' argument will be deprecated. Use 'block-collapse' instead."
|
27
|
+
}
|
28
|
+
|
29
|
+
@if $display == collapse or $display == block-collapse {
|
23
30
|
width: flex-grid($columns, $container-columns) + flex-gutter($container-columns);
|
24
31
|
|
25
32
|
&:last-child {
|
data/lib/neat/version.rb
CHANGED
data/neat.gemspec
CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ["support@thoughtbot.com"]
|
11
11
|
s.homepage = "https://github.com/thoughtbot/neat"
|
12
12
|
s.summary = "A fluid grid framework on top of Bourbon"
|
13
|
+
s.license = 'MIT'
|
13
14
|
s.description = <<-DESC
|
14
15
|
Neat is an open source grid framework built on top of Bourbon with the aim of being easy enough to use out of the box and flexible enough to customize down the road.
|
15
16
|
DESC
|
data/spec/neat/columns_spec.rb
CHANGED
@@ -47,17 +47,27 @@ describe "@include span-columns()" do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
context "with argument (collapse)" do
|
50
|
+
context "with argument (block-collapse)" do
|
51
51
|
it "appends gutter width to column width" do
|
52
52
|
expect('.span-columns-collapse').to have_rule('width: 51.17883%')
|
53
53
|
end
|
54
54
|
|
55
55
|
it "removes the next gutter" do
|
56
|
-
expect('.span-columns-collapse').to_not have_rule('margin-right')
|
56
|
+
expect('.span-columns-collapse').to_not have_rule('margin-right: 2.35765%')
|
57
57
|
end
|
58
58
|
|
59
59
|
it "removes gutter percentage from the width of the last child" do
|
60
60
|
expect('.span-columns-collapse:last-child').to have_rule('width: 48.82117%')
|
61
61
|
end
|
62
62
|
end
|
63
|
+
|
64
|
+
context "with argument (no-display)" do
|
65
|
+
it "doesn't set display property" do
|
66
|
+
expect('.span-columns-no-display').to_not have_rule('display: block')
|
67
|
+
end
|
68
|
+
|
69
|
+
it "sets width in percentage based on a block layout" do
|
70
|
+
expect('.span-columns-no-display').to have_rule('width: 48.82117%')
|
71
|
+
end
|
72
|
+
end
|
63
73
|
end
|
data/test/shift.scss
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
@import 'setup';
|
2
2
|
|
3
|
+
.shift-default {
|
4
|
+
@include shift;
|
5
|
+
}
|
6
|
+
|
3
7
|
.shift-positive {
|
4
8
|
@include shift(2);
|
5
9
|
}
|
@@ -13,8 +17,7 @@
|
|
13
17
|
@include span-columns(6);
|
14
18
|
|
15
19
|
.shifted-child {
|
16
|
-
@include
|
17
|
-
@include shift(2);
|
20
|
+
@include shift(2 of 6);
|
18
21
|
}
|
19
22
|
}
|
20
23
|
|
@@ -31,7 +34,3 @@ section {
|
|
31
34
|
@include reset-layout-direction;
|
32
35
|
}
|
33
36
|
}
|
34
|
-
|
35
|
-
.shift-default {
|
36
|
-
@include shift;
|
37
|
-
}
|
data/test/span-columns.scss
CHANGED
@@ -12,10 +12,10 @@
|
|
12
12
|
@include span-columns(2, table);
|
13
13
|
}
|
14
14
|
|
15
|
-
.span-columns-
|
16
|
-
@include span-columns(6,
|
15
|
+
.span-columns-collapse {
|
16
|
+
@include span-columns(6, block-collapse);
|
17
17
|
}
|
18
18
|
|
19
|
-
.span-columns-
|
20
|
-
@include span-columns(6,
|
19
|
+
.span-columns-no-display {
|
20
|
+
@include span-columns(6, no-display);
|
21
21
|
}
|
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.
|
4
|
+
version: 1.5.0.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Fiedler
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sass
|
@@ -159,7 +159,6 @@ files:
|
|
159
159
|
- app/assets/stylesheets/_neat.scss
|
160
160
|
- app/assets/stylesheets/functions/_new-breakpoint.scss
|
161
161
|
- app/assets/stylesheets/functions/_private.scss
|
162
|
-
- app/assets/stylesheets/functions/_px-to-em.scss
|
163
162
|
- app/assets/stylesheets/grid/_fill-parent.scss
|
164
163
|
- app/assets/stylesheets/grid/_grid.scss
|
165
164
|
- app/assets/stylesheets/grid/_media.scss
|
@@ -207,7 +206,8 @@ files:
|
|
207
206
|
- test/shift.scss
|
208
207
|
- test/span-columns.scss
|
209
208
|
homepage: https://github.com/thoughtbot/neat
|
210
|
-
licenses:
|
209
|
+
licenses:
|
210
|
+
- MIT
|
211
211
|
metadata: {}
|
212
212
|
post_install_message:
|
213
213
|
rdoc_options: []
|
@@ -220,9 +220,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
220
|
version: '0'
|
221
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
222
|
requirements:
|
223
|
-
- - '
|
223
|
+
- - '>'
|
224
224
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
225
|
+
version: 1.3.1
|
226
226
|
requirements: []
|
227
227
|
rubyforge_project: neat
|
228
228
|
rubygems_version: 2.0.3
|