neat 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91ae990df97858138440bb7970ca0455b0341a6a
4
- data.tar.gz: d3f9a225a1ee9f9a03f59305fc94c75784cb194d
3
+ metadata.gz: 96bb57df9fe71265794ef5dbcfd6f88ac84cc967
4
+ data.tar.gz: f3f4d4c5e306187c5a274fcdc014df8d22c402de
5
5
  SHA512:
6
- metadata.gz: d5fa2e3ad5de0b1e533a158ba3f093910b51754dadffe6366083c0554f5bce6dbfd4eb479f43307fb38b70e88e71ed832fa4556c46819e56182b5e59723242b3
7
- data.tar.gz: 6163574b88d69ebf81656306568e663978589057ebf472b851d8487998b16bb34f7428e82dcd9eb9a9ab3da3dd458793c21864decdc13167f229f3455b8123fc
6
+ metadata.gz: ca3a41c7ec83d932a931f81542dad5bfecca05adef5f99526181b65cfb14a25f764ea008e6bbf25dd17217b6c148a9421e3e0454b29d18324261afd2687e12ef
7
+ data.tar.gz: c879ea4649d50196a7046d90168b1a10470eba34fe57f917a1befa368780a7394e4d9c14b14e66a6d94ac897eb333ea943097d39acd567acff245c9e2afebd0c
data/LICENSE CHANGED
@@ -2,7 +2,7 @@ LICENSE
2
2
 
3
3
  The MIT License
4
4
 
5
- Copyright (c) 2012-2013 thoughtbot, inc.
5
+ Copyright (c) 2012-2014 thoughtbot, inc.
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -177,6 +177,7 @@ Links
177
177
  - Suggest features or file bugs in [Issues](https://github.com/thoughtbot/neat/issues).
178
178
  - Read the [contribution guidelines](https://github.com/thoughtbot/neat/blob/master/CONTRIBUTING.md).
179
179
  - Say hi to [@kaishin](https://twitter.com/kaishin) and [@kylefiedler](https://twitter.com/kylefiedler).
180
+ - Join `#bourbon-neat` on `irc.freenode.net`.
180
181
 
181
182
 
182
183
  Credits & License
@@ -186,4 +187,4 @@ Credits & License
186
187
 
187
188
  Bourbon is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/). Follow [@thoughtbot](http://twitter.com/thoughtbot) on Twitter.
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.
190
+ Bourbon Neat is Copyright © 2012-2014 thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ task :test do
11
11
  puts "Creating a Bourbon directory..."
12
12
  `bourbon install --path test`
13
13
  puts "Generating CSS..."
14
- `sass --watch test:css/ --style expanded`
14
+ `sass -I . --watch test:css/ --style expanded`
15
15
  end
16
16
 
17
17
  task :clean do
@@ -1,4 +1,4 @@
1
- // Bourbon Neat 1.5.0
1
+ // Bourbon Neat 1.5.1
2
2
  // MIT Licensed
3
3
  // Copyright (c) 2012-2013 thoughtbot, inc.
4
4
 
@@ -4,7 +4,7 @@
4
4
  $query: $default-feature nth($query, 1) $total-columns;
5
5
  }
6
6
 
7
- @else if length($query) == 2 or length($query) == 4 {
7
+ @else if length($query) % 2 == 0 {
8
8
  $query: append($query, $total-columns);
9
9
  }
10
10
 
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  @function container-shift($shift: $shift) {
48
- $parent-columns: $grid-columns !default;
48
+ $parent-columns: $grid-columns !default;
49
49
 
50
50
  @if length($shift) == 3 {
51
51
  $container-columns: nth($shift, 3);
@@ -1,5 +1,4 @@
1
1
  @mixin media($query:$feature $value $columns, $total-columns: $grid-columns) {
2
-
3
2
  @if length($query) == 1 {
4
3
  @media screen and ($default-feature: nth($query, 1)) {
5
4
  $default-grid-columns: $grid-columns;
@@ -9,43 +8,31 @@
9
8
  }
10
9
  }
11
10
 
12
- @else if length($query) == 2 {
13
- @media screen and (nth($query, 1): nth($query, 2)) {
14
- $default-grid-columns: $grid-columns;
15
- $grid-columns: $total-columns;
16
- @content;
17
- $grid-columns: $default-grid-columns;
18
- }
19
- }
11
+ @else {
12
+ $loopTo: length($query);
13
+ $mediaQuery: 'screen and ';
14
+ $default-grid-columns: $grid-columns;
15
+ $grid-columns: $total-columns;
20
16
 
21
- @else if length($query) == 3 {
22
- @media screen and (nth($query, 1): nth($query, 2)) {
23
- $default-grid-columns: $grid-columns;
24
- $grid-columns: nth($query, 3);
25
- @content;
26
- $grid-columns: $default-grid-columns;
17
+ @if length($query) % 2 != 0 {
18
+ $grid-columns: nth($query, $loopTo);
19
+ $loopTo: $loopTo - 1;
27
20
  }
28
- }
29
21
 
30
- @else if length($query) == 4 {
31
- @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
32
- $default-grid-columns: $grid-columns;
33
- $grid-columns: $total-columns;
34
- @content;
35
- $grid-columns: $default-grid-columns;
22
+ $i: 1;
23
+ @while $i <= $loopTo {
24
+ $mediaQuery: $mediaQuery + '(' + nth($query, $i) + ': ' + nth($query, $i + 1) + ') ';
25
+
26
+ @if ($i + 1) != $loopTo {
27
+ $mediaQuery: $mediaQuery + 'and ';
28
+ }
29
+
30
+ $i: $i + 2;
36
31
  }
37
- }
38
32
 
39
- @else if length($query) == 5 {
40
- @media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
41
- $default-grid-columns: $grid-columns;
42
- $grid-columns: nth($query, 5);
33
+ @media #{$mediaQuery} {
43
34
  @content;
44
35
  $grid-columns: $default-grid-columns;
45
36
  }
46
37
  }
47
-
48
- @else {
49
- @warn "Wrong number of arguments for breakpoint(). Read the documentation for more details.";
50
- }
51
38
  }
@@ -9,6 +9,10 @@
9
9
  $direction: get-direction($layout-direction, $default-layout-direction);
10
10
  }
11
11
 
12
+ @if $table {
13
+ @warn "The omega mixin no longer removes padding in table layouts."
14
+ }
15
+
12
16
  @if length($query) == 1 {
13
17
  @if $auto {
14
18
  &:last-child {
@@ -16,14 +20,8 @@
16
20
  }
17
21
  }
18
22
 
19
- @else if contains-display-value($query) {
20
- @if $table {
21
- padding-#{$direction}: 0;
22
- }
23
-
24
- @else {
25
- margin-#{$direction}: 0;
26
- }
23
+ @else if contains-display-value($query) and $table == false {
24
+ margin-#{$direction}: 0;
27
25
  }
28
26
 
29
27
  @else {
@@ -32,30 +30,14 @@
32
30
  }
33
31
 
34
32
  @else if length($query) == 2 {
35
- @if $table {
36
- @if $auto {
37
- &:last-child {
38
- padding-#{$direction}: 0;
39
- }
40
- }
41
-
42
- @else {
43
- &:nth-child(#{nth($query, 1)}) {
44
- padding-#{$direction}: 0;
45
- }
33
+ @if $auto {
34
+ &:last-child {
35
+ margin-#{$direction}: 0;
46
36
  }
47
37
  }
48
38
 
49
39
  @else {
50
- @if $auto {
51
- &:last-child {
52
- margin-#{$direction}: 0;
53
- }
54
- }
55
-
56
- @else {
57
- @include nth-child(nth($query, 1), $direction);
58
- }
40
+ @include nth-child(nth($query, 1), $direction);
59
41
  }
60
42
  }
61
43
 
@@ -41,10 +41,3 @@ $layout-direction: nil !default;
41
41
 
42
42
  @return $display-table;
43
43
  }
44
-
45
- @function get-padding-for-table-layout($columns, $total-columns) {
46
- $total-padding: flex-gutter($total-columns) * ($columns - 1);
47
- $padding: $total-padding / $columns;
48
-
49
- @return $padding;
50
- }
@@ -11,10 +11,8 @@
11
11
  $display-table: is-display-table($container-display-table, $display);
12
12
 
13
13
  @if $display-table {
14
- $padding: get-padding-for-table-layout($columns, $container-columns);
15
14
  display: table-cell;
16
- padding-#{$direction}: $padding;
17
- width: flex-grid($columns, $container-columns) + $padding;
15
+ width: percentage($columns / $container-columns);
18
16
  } @else {
19
17
  float: #{$opposite-direction};
20
18
 
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neat",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "homepage": "http://neat.bourbon.io/",
5
5
  "main": "app/assets/stylesheets/_neat.scss",
6
6
  "ignore": [
@@ -12,6 +12,9 @@
12
12
  "Rakefile",
13
13
  "neat.gemspec",
14
14
  "CONTRIBUTING.md",
15
- "NEWS.md",
16
- ]
15
+ "NEWS.md"
16
+ ],
17
+ "dependencies": {
18
+ "bourbon": ">=3.1"
19
+ }
17
20
  }
data/lib/neat/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neat
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
  end
data/neat.gemspec CHANGED
@@ -3,29 +3,29 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
  require 'neat/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "neat"
6
+ s.name = 'neat'
7
7
  s.version = Neat::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Kyle Fiedler", "Reda Lemeden", "Joel Oliveira"]
10
- s.email = ["support@thoughtbot.com"]
11
- s.homepage = "https://github.com/thoughtbot/neat"
12
- s.summary = "A fluid grid framework on top of Bourbon"
9
+ s.authors = ['Kyle Fiedler', 'Reda Lemeden', 'Joel Oliveira']
10
+ s.email = ['support@thoughtbot.com']
11
+ s.homepage = 'https://github.com/thoughtbot/neat'
12
+ s.summary = 'A fluid grid framework on top of Bourbon'
13
13
  s.license = 'MIT'
14
14
  s.description = <<-DESC
15
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.
16
16
  DESC
17
17
 
18
- s.rubyforge_project = "neat"
18
+ s.rubyforge_project = 'neat'
19
19
 
20
20
  s.files = `git ls-files`.split("\n")
21
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
22
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
- s.require_paths = ["lib"]
23
+ s.require_paths = ['lib']
24
24
 
25
- s.add_dependency('sass', '>= 3.2')
26
- s.add_dependency('bourbon', '>= 2.1')
25
+ s.add_dependency('sass', '~> 3.2.19')
26
+ s.add_dependency('bourbon', '>= 3.1')
27
27
 
28
- s.add_development_dependency('aruba', '~> 0.4')
28
+ s.add_development_dependency('aruba', '~> 0.5.0')
29
29
  s.add_development_dependency('rake')
30
30
  s.add_development_dependency('css_parser')
31
31
  s.add_development_dependency('rspec')
@@ -42,8 +42,8 @@ describe "@include span-columns()" do
42
42
  expect('.span-columns-table').to have_rule('display: table-cell')
43
43
  end
44
44
 
45
- it "sets padding evenly between table cells" do
46
- expect('.span-columns-table').to have_rule('padding-right: 1.17883%')
45
+ it "sets width evenly between elements" do
46
+ expect('.span-columns-table').to have_rule('width: 50%')
47
47
  end
48
48
  end
49
49
 
@@ -42,4 +42,14 @@ describe "@include media()" do
42
42
  expect('.change-media-context-shorthand').to have_rule('width: 100%')
43
43
  end
44
44
  end
45
+
46
+ context "with composite argument (max-width 768px min-width 110px orientation portait 6)" do
47
+ it "outputs @media screen and (max-width: 768px) and (min-width: 110px) and (orientation: portait)" do
48
+ expect('.composite-media-query').to be_contained_in('screen and (max-width: 768px) and (min-width: 110px) and (orientation: portait)')
49
+ end
50
+
51
+ it "uses a 6-column grid" do
52
+ expect('.composite-media-query').to have_rule('width: 100%')
53
+ end
54
+ end
45
55
  end
@@ -11,12 +11,6 @@ describe "@include omega()" do
11
11
  end
12
12
  end
13
13
 
14
- context "with argument (table)" do
15
- it "removes right padding" do
16
- expect('.omega-table').to have_rule('padding-right: 0')
17
- end
18
- end
19
-
20
14
  context "with argument (4n)" do
21
15
  it "removes right margin of nth-child(4n)" do
22
16
  expect('.omega-nth-default:nth-child(4n)').to have_rule('margin-right: 0')
@@ -27,12 +21,6 @@ describe "@include omega()" do
27
21
  end
28
22
  end
29
23
 
30
- context "with argument (4n table)" do
31
- it "removes right padding of nth-child(4n)" do
32
- expect('.omega-nth-table:nth-child(4n)').to have_rule('padding-right: 0')
33
- end
34
- end
35
-
36
24
  context "with argument ('4n+1')" do
37
25
  it "removes right margin of nth-child(4n+1)" do
38
26
  expect('.omega-complex-nth:nth-child(4n+1)').to have_rule('margin-right: 0')
@@ -46,22 +34,10 @@ describe "@include omega()" do
46
34
  end
47
35
  end
48
36
 
49
- context "with argument (table)" do
50
- it "removes left padding" do
51
- expect('section .omega-table-left').to have_rule('padding-left: 0')
52
- end
53
- end
54
-
55
37
  context "with argument (4n block)" do
56
38
  it "removes left margin of nth-child(4n)" do
57
39
  expect('section .omega-nth-default-left:nth-child(4n)').to have_rule('margin-left: 0')
58
40
  end
59
41
  end
60
-
61
- context "with argument (4n table)" do
62
- it "removes left padding of nth-child(4n)" do
63
- expect('section .omega-nth-table-left:nth-child(4n)').to have_rule('padding-left: 0')
64
- end
65
- end
66
42
  end
67
43
  end
@@ -1,7 +1,7 @@
1
1
  module SassSupport
2
2
  def generate_css
3
3
  _mkdir('tmp')
4
- `sass --update test:tmp --style expanded`
4
+ `sass -I . --update test:tmp`
5
5
  end
6
6
 
7
7
  def clean_up
data/test/media.scss CHANGED
@@ -1,5 +1,7 @@
1
1
  @import 'setup';
2
2
 
3
+ $composite: new-breakpoint(max-width 768px min-width 110px orientation portait 6);
4
+
3
5
  .media-default {
4
6
  @include media(481px) {
5
7
  color: #000;
@@ -29,3 +31,9 @@
29
31
  @include span-columns(6);
30
32
  }
31
33
  }
34
+
35
+ .composite-media-query {
36
+ @include media($composite) {
37
+ @include span-columns(6);
38
+ }
39
+ }
data/test/omega.scss CHANGED
@@ -4,18 +4,10 @@
4
4
  @include omega;
5
5
  }
6
6
 
7
- .omega-table {
8
- @include omega(table);
9
- }
10
-
11
7
  .omega-nth-default {
12
8
  @include omega(4n)
13
9
  }
14
10
 
15
- .omega-nth-table {
16
- @include omega(4n table);
17
- }
18
-
19
11
  .omega-complex-nth {
20
12
  @include omega("4n+1");
21
13
  }
@@ -27,16 +19,7 @@ section {
27
19
  @include omega;
28
20
  }
29
21
 
30
- .omega-table-left{
31
- @include omega(table);
32
- }
33
-
34
22
  .omega-nth-default-left {
35
23
  @include omega(4n block);
36
24
  }
37
-
38
- .omega-nth-table-left {
39
- @include omega(4n table);
40
- @include reset-layout-direction;
41
- }
42
25
  }
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .span-columns-table {
12
- @include span-columns(2, table);
12
+ @include span-columns(6, table);
13
13
  }
14
14
 
15
15
  .span-columns-collapse {
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.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Fiedler
@@ -10,132 +10,132 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-11-22 00:00:00.000000000 Z
13
+ date: 2014-04-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sass
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - '>='
19
+ - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '3.2'
21
+ version: 3.2.19
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - '>='
26
+ - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '3.2'
28
+ version: 3.2.19
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: bourbon
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - '>='
33
+ - - ">="
34
34
  - !ruby/object:Gem::Version
35
- version: '2.1'
35
+ version: '3.1'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - '>='
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '2.1'
42
+ version: '3.1'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: aruba
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - ~>
47
+ - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '0.4'
49
+ version: 0.5.0
50
50
  type: :development
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ~>
54
+ - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: '0.4'
56
+ version: 0.5.0
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rake
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - '>='
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - '>='
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: css_parser
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - '>='
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - '>='
82
+ - - ">="
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rspec
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - '>='
96
+ - - ">="
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rdoc
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - '>='
110
+ - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: bundler
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - '>='
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: rb-fsevent
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ~>
131
+ - - "~>"
132
132
  - !ruby/object:Gem::Version
133
133
  version: 0.9.1
134
134
  type: :development
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ~>
138
+ - - "~>"
139
139
  - !ruby/object:Gem::Version
140
140
  version: 0.9.1
141
141
  description: |
@@ -147,8 +147,8 @@ executables:
147
147
  extensions: []
148
148
  extra_rdoc_files: []
149
149
  files:
150
- - .gitignore
151
- - .rspec
150
+ - ".gitignore"
151
+ - ".rspec"
152
152
  - CONTRIBUTING.md
153
153
  - Gemfile
154
154
  - LICENSE
@@ -216,17 +216,17 @@ require_paths:
216
216
  - lib
217
217
  required_ruby_version: !ruby/object:Gem::Requirement
218
218
  requirements:
219
- - - '>='
219
+ - - ">="
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  requirements:
224
- - - '>='
224
+ - - ">="
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
228
  rubyforge_project: neat
229
- rubygems_version: 2.0.3
229
+ rubygems_version: 2.1.11
230
230
  signing_key:
231
231
  specification_version: 4
232
232
  summary: A fluid grid framework on top of Bourbon