neat 1.9.1 → 2.0.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -4
- data/.hound.yml +5 -0
- data/.npmignore +0 -4
- data/.scss-lint.yml +3 -1
- data/CHANGELOG.md +45 -23
- data/CONTRIBUTING.md +12 -0
- data/Gemfile +1 -2
- data/Gulpfile.js +5 -6
- data/LICENSE.md +1 -1
- data/README.md +26 -163
- data/RELEASING.md +27 -0
- data/Rakefile +3 -13
- data/bower.json +8 -9
- data/circle.yml +13 -0
- data/contrib/base/_grids.scss +4 -0
- data/contrib/base/_variables.scss +8 -0
- data/contrib/index.html +68 -223
- data/contrib/patterns/_box.scss +11 -0
- data/contrib/patterns/_global.scss +5 -0
- data/contrib/patterns/_grid-media.scss +52 -0
- data/contrib/patterns/_grid-nested.scss +7 -0
- data/contrib/patterns/_grid-push.scss +7 -0
- data/contrib/patterns/_grid-shift.scss +7 -0
- data/contrib/patterns/_grid.scss +31 -0
- data/contrib/styles.scss +12 -293
- data/core/_neat.scss +20 -0
- data/core/neat/functions/_neat-column-default.scss +23 -0
- data/core/neat/functions/_neat-column-ratio.scss +24 -0
- data/core/neat/functions/_neat-column-width.scss +25 -0
- data/core/neat/functions/_neat-parse-columns.scss +22 -0
- data/core/neat/functions/_neat-parse-media.scss +20 -0
- data/core/neat/functions/_retrieve-neat-settings.scss +18 -0
- data/core/neat/mixins/_grid-column.scss +29 -0
- data/{app/assets/stylesheets/mixins/_clearfix.scss → core/neat/mixins/_grid-container.scss} +5 -5
- data/core/neat/mixins/_grid-media.scss +50 -0
- data/core/neat/mixins/_grid-push.scss +32 -0
- data/core/neat/mixins/_grid-shift.scss +31 -0
- data/core/neat/settings/_settings.scss +41 -0
- data/index.js +1 -1
- data/lib/neat.rb +5 -18
- data/lib/neat/generator.rb +1 -1
- data/lib/neat/version.rb +1 -1
- data/neat.gemspec +27 -33
- data/package.json +5 -4
- data/spec/.keep +0 -0
- data/spec/fixtures/_setup.scss +1 -0
- data/spec/fixtures/functions/neat-column-default.scss +22 -0
- data/spec/fixtures/functions/neat-column-width.scss +30 -0
- data/spec/fixtures/functions/neat-parse-media.scss +9 -0
- data/spec/fixtures/functions/retrieve-neat-settings.scss +22 -0
- data/spec/fixtures/mixins/grid-column.scss +57 -0
- data/spec/fixtures/mixins/grid-container.scss +5 -0
- data/spec/fixtures/mixins/grid-push.scss +38 -0
- data/spec/fixtures/mixins/grid-shift.scss +38 -0
- data/spec/neat/functions/neat_column_default_spec.rb +35 -0
- data/spec/neat/functions/neat_column_width_spec.rb +47 -0
- data/spec/neat/functions/neat_parse_media_spec.rb +23 -0
- data/spec/neat/functions/retrieve_neat_settings_spec.rb +35 -0
- data/spec/neat/mixins/grid_column_spec.rb +101 -0
- data/spec/neat/mixins/grid_container_spec.rb +17 -0
- data/spec/neat/mixins/grid_push_spec.rb +59 -0
- data/spec/neat/mixins/grid_shift_spec.rb +59 -0
- data/spec/support/matchers/have_ruleset.rb +20 -0
- data/spec/support/matchers/have_value.rb +9 -7
- data/spec/support/parser_support.rb +8 -1
- data/spec/support/sass_support.rb +1 -1
- metadata +76 -153
- data/.rspec +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -10
- data/app/assets/stylesheets/_neat-helpers.scss +0 -11
- data/app/assets/stylesheets/_neat.scss +0 -24
- data/app/assets/stylesheets/functions/_new-breakpoint.scss +0 -49
- data/app/assets/stylesheets/functions/_private.scss +0 -154
- data/app/assets/stylesheets/grid/_box-sizing.scss +0 -15
- data/app/assets/stylesheets/grid/_direction-context.scss +0 -33
- data/app/assets/stylesheets/grid/_display-context.scss +0 -28
- data/app/assets/stylesheets/grid/_fill-parent.scss +0 -22
- data/app/assets/stylesheets/grid/_media.scss +0 -92
- data/app/assets/stylesheets/grid/_omega.scss +0 -112
- data/app/assets/stylesheets/grid/_outer-container.scss +0 -34
- data/app/assets/stylesheets/grid/_pad.scss +0 -25
- data/app/assets/stylesheets/grid/_private.scss +0 -35
- data/app/assets/stylesheets/grid/_reset-display.scss +0 -14
- data/app/assets/stylesheets/grid/_row.scss +0 -45
- data/app/assets/stylesheets/grid/_shift.scss +0 -50
- data/app/assets/stylesheets/grid/_span-columns.scss +0 -94
- data/app/assets/stylesheets/grid/_to-deprecate.scss +0 -81
- data/app/assets/stylesheets/grid/_visual-grid.scss +0 -42
- data/app/assets/stylesheets/settings/_disable-warnings.scss +0 -13
- data/app/assets/stylesheets/settings/_grid.scss +0 -51
- data/app/assets/stylesheets/settings/_visual-grid.scss +0 -27
- data/lib/neat/engine.rb +0 -5
- data/lib/tasks/install.rake +0 -19
- data/sache.json +0 -5
- data/spec/neat/columns_spec.rb +0 -73
- data/spec/neat/container_spec.rb +0 -21
- data/spec/neat/default_spec.rb +0 -15
- data/spec/neat/direction_spec.rb +0 -19
- data/spec/neat/display_spec.rb +0 -19
- data/spec/neat/media_spec.rb +0 -55
- data/spec/neat/new_breakpoint_spec.rb +0 -17
- data/spec/neat/omega_spec.rb +0 -66
- data/spec/neat/pad_spec.rb +0 -32
- data/spec/neat/row_spec.rb +0 -39
- data/spec/neat/shift_spec.rb +0 -41
- data/test/_setup.scss +0 -2
- data/test/default.scss +0 -1
- data/test/direction-context.scss +0 -13
- data/test/display-context.scss +0 -15
- data/test/media.scss +0 -39
- data/test/new-breakpoint.scss +0 -13
- data/test/omega.scss +0 -29
- data/test/outer-container.scss +0 -11
- data/test/pad.scss +0 -17
- data/test/row.scss +0 -26
- data/test/shift.scss +0 -36
- data/test/span-columns.scss +0 -21
data/RELEASING.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Releasing
|
2
|
+
|
3
|
+
1. Update the version number in these places:
|
4
|
+
- `lib/neat/version.rb`
|
5
|
+
- `core/neat/_neat.scss`
|
6
|
+
- `package.json`
|
7
|
+
- `bower.json`
|
8
|
+
|
9
|
+
1. Update `CHANGELOG.md`
|
10
|
+
|
11
|
+
1. Commit changes. Use the convention “Neat vX.X.X” in your commit message.
|
12
|
+
There shouldn’t be code changes, and thus CI doesn’t need to run.
|
13
|
+
|
14
|
+
1. Run `bundle exec rake release`, which tags the release, pushes the tag to GitHub, and
|
15
|
+
pushes the gem to RubyGems.org.
|
16
|
+
|
17
|
+
1. Run `npm publish`, which pushes the new version to npm’s registry (if
|
18
|
+
releasing a pre-release, run `npm publish --tag beta`).
|
19
|
+
|
20
|
+
1. Add a [new GitHub release](//github.com/thoughtbot/neat/releases/new).
|
21
|
+
|
22
|
+
1. Re-generate and publish
|
23
|
+
the [documentation website](//github.com/thoughtbot/neat-docs),
|
24
|
+
using the available Gulp tasks.
|
25
|
+
|
26
|
+
1. Announce the new release, making sure to say “thank you” to the contributors
|
27
|
+
who helped shape this version!
|
data/Rakefile
CHANGED
@@ -1,18 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
|
1
|
+
require "bundler"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
4
|
Bundler::GemHelper.install_tasks
|
5
5
|
|
6
6
|
RSpec::Core::RakeTask.new(:spec)
|
7
7
|
|
8
8
|
task :default => :spec
|
9
|
-
|
10
|
-
task :test do
|
11
|
-
puts "Generating CSS..."
|
12
|
-
`sass -I . --watch test:css/ --style expanded`
|
13
|
-
end
|
14
|
-
|
15
|
-
task :clean do
|
16
|
-
puts "Deleting generated CSS..."
|
17
|
-
`rm -rf css/`
|
18
|
-
end
|
data/bower.json
CHANGED
@@ -1,22 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"name": "neat",
|
3
|
-
"description": "A lightweight, semantic grid framework",
|
4
|
-
"version": "
|
5
|
-
"main": "
|
3
|
+
"description": "A lightweight, semantic grid framework built with Bourbon",
|
4
|
+
"version": "2.0.0-alpha.1",
|
5
|
+
"main": "core/_neat.scss",
|
6
6
|
"license": "MIT",
|
7
7
|
"ignore": [
|
8
8
|
"**/.*",
|
9
|
+
"bin",
|
10
|
+
"bin",
|
9
11
|
"CONTRIBUTING.md",
|
10
12
|
"Gemfile",
|
11
13
|
"Gemfile.lock",
|
12
|
-
"NEWS.md",
|
13
|
-
"Rakefile",
|
14
|
-
"bin",
|
15
14
|
"lib",
|
16
15
|
"neat.gemspec",
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
16
|
+
"NEWS.md",
|
17
|
+
"Rakefile",
|
18
|
+
"spec"
|
20
19
|
],
|
21
20
|
"keywords": [
|
22
21
|
"columns",
|
data/circle.yml
ADDED
data/contrib/index.html
CHANGED
@@ -1,225 +1,70 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7
|
+
<title>Have fun ❤︎</title>
|
8
|
+
<link rel="stylesheet" href="styles.css">
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<header role="banner">
|
12
|
+
<h1>
|
13
|
+
Hey there! Thanks for contributing to
|
14
|
+
<a href="http://neat.bourbon.io">Neat</a>.
|
15
|
+
</h1>
|
16
|
+
<p>
|
17
|
+
The purpose of this page is to help contributors view and test
|
18
|
+
changes to Neat.
|
19
|
+
</p>
|
20
|
+
</header>
|
21
|
+
<main role="main">
|
22
|
+
<div class="grid">
|
23
|
+
<div class="grid__column--full">
|
24
|
+
<h3>Basic Floated Grid</h3>
|
21
25
|
</div>
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
<
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<
|
35
|
-
|
36
|
-
<code>@include outer-container;</code>
|
37
|
-
<div class="page-section-inner first-alpha">
|
38
|
-
<code>(1)</code>
|
39
|
-
</div>
|
40
|
-
<div class="page-section-inner first-beta">
|
41
|
-
<code>
|
42
|
-
@include span-columns(11);<br>
|
43
|
-
@include omega();
|
44
|
-
</code>
|
45
|
-
</div>
|
46
|
-
<div class="page-section-inner first-gamma">
|
47
|
-
<code>
|
48
|
-
@include span-columns(2);
|
49
|
-
</code>
|
50
|
-
</div>
|
51
|
-
<div class="page-section-inner first-delta">
|
52
|
-
<code>
|
53
|
-
@include span-columns(10);<br>
|
54
|
-
@include omega();
|
55
|
-
</code>
|
56
|
-
</div>
|
57
|
-
<div class="page-section-inner first-epsilon">
|
58
|
-
<code>
|
59
|
-
@include span-columns(3);
|
60
|
-
</code>
|
61
|
-
</div>
|
62
|
-
<div class="page-section-inner first-zeta">
|
63
|
-
<code>
|
64
|
-
@include span-columns(9);<br>
|
65
|
-
@include omega();
|
66
|
-
</code>
|
67
|
-
</div>
|
68
|
-
<div class="page-section-inner first-eta">
|
69
|
-
<code>
|
70
|
-
@include span-columns(4);
|
71
|
-
</code>
|
72
|
-
</div>
|
73
|
-
<div class="page-section-inner first-theta">
|
74
|
-
<code>
|
75
|
-
@include span-columns(8);<br>
|
76
|
-
@include omega();
|
77
|
-
</code>
|
78
|
-
</div>
|
79
|
-
<div class="page-section-inner first-iota">
|
80
|
-
<code>
|
81
|
-
@include span-columns(5);
|
82
|
-
</code>
|
83
|
-
</div>
|
84
|
-
<div class="page-section-inner first-kappa">
|
85
|
-
<code>
|
86
|
-
@include span-columns(7);<br>
|
87
|
-
@include omega();
|
88
|
-
</code>
|
89
|
-
</div>
|
90
|
-
<div class="page-section-inner first-lambda">
|
91
|
-
<code>
|
92
|
-
@include span-columns(6);
|
93
|
-
</code>
|
94
|
-
</div>
|
95
|
-
<div class="page-section-inner first-mu">
|
96
|
-
<code>
|
97
|
-
@include span-columns(6);<br>
|
98
|
-
@include omega();
|
99
|
-
</code>
|
100
|
-
</div>
|
101
|
-
</section>
|
102
|
-
<h3>Nesting columns</h3>
|
103
|
-
<section class="page-section second">
|
104
|
-
<code>@include outer-container;</code>
|
105
|
-
<div class="page-section-inner second-alpha">
|
106
|
-
<code>@include span-columns(4);</code>
|
107
|
-
</div>
|
108
|
-
<div class="page-section-inner second-beta">
|
109
|
-
<code class="block">@include span-columns(8);</code>
|
110
|
-
<aside class="second-beta-alpha">
|
111
|
-
<code>@include span-columns(4 of 8);</code>
|
112
|
-
</aside>
|
113
|
-
<article class="second-beta-beta">
|
114
|
-
<code>@include span-columns(4 of 8);</code>
|
115
|
-
</article>
|
116
|
-
</div>
|
117
|
-
</section>
|
118
|
-
<h3>Table grid</h3>
|
119
|
-
<section class="page-section third">
|
120
|
-
<code>@include outer-container;</code>
|
121
|
-
<div class="page-section-inner third-dummy">
|
122
|
-
<code>
|
123
|
-
@include fill-parent();<br>
|
124
|
-
@include row(table);
|
125
|
-
</code>
|
126
|
-
</div>
|
127
|
-
<div class="page-section-inner third-alpha">
|
128
|
-
<aside class="third-alpha-alpha">
|
129
|
-
<code>
|
130
|
-
@include span-columns(4);<br>
|
131
|
-
@include pad();
|
132
|
-
</code>
|
133
|
-
</aside>
|
134
|
-
<article class="third-alpha-beta">
|
135
|
-
<code>
|
136
|
-
@include span-columns(8);<br>
|
137
|
-
@include reset-display;
|
138
|
-
</code>
|
139
|
-
</article>
|
140
|
-
</div>
|
141
|
-
</section>
|
142
|
-
<h3>Shifting columns</h3>
|
143
|
-
<section class="page-section fourth">
|
144
|
-
<code>@include outer-container;</code>
|
145
|
-
<div class="page-section-inner fourth-alpha">
|
146
|
-
<code>
|
147
|
-
@include span-columns(6);<br>
|
148
|
-
@include shift(3);
|
149
|
-
</code>
|
150
|
-
</div>
|
151
|
-
</section>
|
152
|
-
<h3>Automatic rows</h3>
|
153
|
-
<div class="code">
|
154
|
-
<code>@include outer-container;</code>
|
26
|
+
<div class="grid__column box"></div>
|
27
|
+
<div class="grid__column box"></div>
|
28
|
+
<div class="grid__column box"></div>
|
29
|
+
<div class="grid__column box"></div>
|
30
|
+
<div class="grid__column box"></div>
|
31
|
+
<div class="grid__column box"></div>
|
32
|
+
<div class="grid__column box"></div>
|
33
|
+
<div class="grid__column box"></div>
|
34
|
+
<div class="grid__column box"></div>
|
35
|
+
<div class="grid__column box"></div>
|
36
|
+
<div class="grid__column box"></div>
|
37
|
+
<div class="grid__column box"></div>
|
38
|
+
<div class="grid__column--full">
|
39
|
+
<h3>Nested Grid</h3>
|
155
40
|
</div>
|
156
|
-
<
|
157
|
-
<div class="box">
|
158
|
-
<
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
</
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
<
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
</
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
</
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
<div class="fifth-box page-section-inner">
|
187
|
-
<code>.box</code>
|
188
|
-
</div>
|
189
|
-
<div class="fifth-box page-section-inner">
|
190
|
-
<code>.box</code>
|
191
|
-
</div>
|
192
|
-
<div class="fifth-box page-section-inner">
|
193
|
-
<code>.box</code>
|
194
|
-
</div>
|
195
|
-
<div class="fifth-box page-section-inner">
|
196
|
-
<code>.box</code>
|
197
|
-
</div>
|
198
|
-
</section>
|
199
|
-
<h3>Media Queries</h3>
|
200
|
-
<section class="page-section sixth">
|
201
|
-
<pre>
|
202
|
-
@include outer-container;
|
203
|
-
$mobile: new-breakpoint(max-width 500px 4);
|
204
|
-
</pre>
|
205
|
-
<div class="page-section-inner sixth-alpha">
|
206
|
-
<pre>
|
207
|
-
@include span-columns(4);
|
208
|
-
|
209
|
-
@include media($mobile) {
|
210
|
-
@include span-columns(3);
|
211
|
-
}
|
212
|
-
</pre>
|
213
|
-
</div>
|
214
|
-
<div class="page-section-inner sixth-beta">
|
215
|
-
<pre>
|
216
|
-
@include span-columns(8);
|
217
|
-
@include media($mobile) {
|
218
|
-
@include span-columns(3);
|
219
|
-
}
|
220
|
-
</pre>
|
221
|
-
</div>
|
222
|
-
</section>
|
223
|
-
</main>
|
224
|
-
</body>
|
225
|
-
</html>
|
41
|
+
<div class="grid__column--thirds grid--nested">
|
42
|
+
<div class="grid--nested__column box--alt"></div>
|
43
|
+
<div class="grid--nested__column box--alt"></div>
|
44
|
+
<div class="grid--nested__column box--alt"></div>
|
45
|
+
</div>
|
46
|
+
<div class="grid__column--thirds box"></div>
|
47
|
+
<div class="grid__column--thirds box"></div>
|
48
|
+
<div class="grid__column--full">
|
49
|
+
<h3>Push Grid</h3>
|
50
|
+
</div>
|
51
|
+
<div class="grid__column--thirds box grid-push--3"></div>
|
52
|
+
<div class="grid__column--full">
|
53
|
+
<h3>Shift Grid</h3>
|
54
|
+
</div>
|
55
|
+
<div class="grid__column--8 grid-shift--4 box"> First</div>
|
56
|
+
<div class="grid__column--4 grid-shift--neg-8 box"> Second</div>
|
57
|
+
<div class="grid__column--full">
|
58
|
+
<h3>Shorthand Sub-Grid</h3>
|
59
|
+
</div>
|
60
|
+
<div class="grid__column--3-of-5 box"></div>
|
61
|
+
<div class="grid__column--2-of-5 box"></div>
|
62
|
+
<div class="grid__column--3-of-5 box grid-push--2-of-5"></div>
|
63
|
+
<div class="grid__column--full">
|
64
|
+
<h3>Grid Media Queries</h3>
|
65
|
+
</div>
|
66
|
+
<div class="grid-column--media-3-to-6 box"></div>
|
67
|
+
</div>
|
68
|
+
</main>
|
69
|
+
</body>
|
70
|
+
</html>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
$medium-screen: 1000px;
|
2
|
+
|
3
|
+
$custom-neat-grid: (
|
4
|
+
columns: 12,
|
5
|
+
gutter: 50px,
|
6
|
+
media: $medium-screen,
|
7
|
+
);
|
8
|
+
|
9
|
+
$specific-neat-grid: (
|
10
|
+
columns: 12,
|
11
|
+
gutter: 80px,
|
12
|
+
media: "only screen and (min-width: 1000px) and (max-width: 1100px)",
|
13
|
+
);
|
14
|
+
|
15
|
+
|
16
|
+
$print-neat-grid: (
|
17
|
+
columns: 10,
|
18
|
+
gutter: 20px,
|
19
|
+
media: print,
|
20
|
+
);
|
21
|
+
|
22
|
+
.grid-column--media-3-to-6 {
|
23
|
+
@include grid-column(3);
|
24
|
+
|
25
|
+
&::before {
|
26
|
+
content: "#{map-get($neat-grid, media)}";
|
27
|
+
}
|
28
|
+
|
29
|
+
@include grid-media($custom-neat-grid) {
|
30
|
+
@include grid-column(6);
|
31
|
+
|
32
|
+
&::before {
|
33
|
+
content: "#{map-get($neat-grid, media)}";
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
@include grid-media($specific-neat-grid) {
|
38
|
+
@include grid-column(6);
|
39
|
+
|
40
|
+
&::before {
|
41
|
+
content: "#{map-get($neat-grid, media)}";
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
@include grid-media($print-neat-grid) {
|
46
|
+
@include grid-column(6);
|
47
|
+
|
48
|
+
&::before {
|
49
|
+
content: "#{map-get($neat-grid, media)}";
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|