neat 1.7.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +34 -0
  3. data/.github/ISSUE_TEMPLATE.md +22 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +8 -0
  5. data/.gitignore +4 -2
  6. data/.hound.yml +5 -0
  7. data/.npmignore +20 -0
  8. data/.scss-lint.yml +239 -0
  9. data/.tool-versions +2 -0
  10. data/CHANGELOG.md +388 -0
  11. data/CODE_OF_CONDUCT.md +6 -0
  12. data/CONTRIBUTING.md +16 -1
  13. data/Gemfile +1 -2
  14. data/Gulpfile.js +42 -0
  15. data/{LICENSE → LICENSE.md} +8 -10
  16. data/README.md +138 -214
  17. data/RELEASING.md +27 -0
  18. data/Rakefile +3 -17
  19. data/bin/neat +2 -2
  20. data/contrib/base/_variables.scss +8 -0
  21. data/contrib/index.html +90 -0
  22. data/contrib/patterns/_box.scss +11 -0
  23. data/contrib/patterns/_global.scss +32 -0
  24. data/contrib/patterns/_grid-collapse.scss +3 -0
  25. data/contrib/patterns/_grid-media.scss +36 -0
  26. data/contrib/patterns/_grid-nested.scss +12 -0
  27. data/contrib/patterns/_grid-push.scss +7 -0
  28. data/contrib/patterns/_grid-shift.scss +7 -0
  29. data/contrib/patterns/_grid-visual.scss +3 -0
  30. data/contrib/patterns/_grid.scss +39 -0
  31. data/contrib/styles.scss +13 -0
  32. data/core/_neat.scss +26 -0
  33. data/core/neat/functions/_neat-append-grid-visual.scss +21 -0
  34. data/core/neat/functions/_neat-column-default.scss +23 -0
  35. data/core/neat/functions/_neat-column-ratio.scss +24 -0
  36. data/core/neat/functions/_neat-column-width.scss +25 -0
  37. data/core/neat/functions/_neat-float-direction.scss +22 -0
  38. data/core/neat/functions/_neat-merge-defaults.scss +23 -0
  39. data/core/neat/functions/_neat-opposite-direction.scss +22 -0
  40. data/core/neat/functions/_neat-parse-columns.scss +22 -0
  41. data/core/neat/functions/_neat-parse-media.scss +20 -0
  42. data/core/neat/functions/_retrieve-neat-settings.scss +19 -0
  43. data/core/neat/mixins/_grid-collapse.scss +35 -0
  44. data/core/neat/mixins/_grid-column.scss +39 -0
  45. data/core/neat/mixins/_grid-container.scss +31 -0
  46. data/core/neat/mixins/_grid-media.scss +88 -0
  47. data/core/neat/mixins/_grid-push.scss +37 -0
  48. data/core/neat/mixins/_grid-shift.scss +36 -0
  49. data/core/neat/mixins/_grid-visual.scss +41 -0
  50. data/core/neat/settings/_settings.scss +74 -0
  51. data/eyeglass-exports.js +7 -0
  52. data/index.js +7 -0
  53. data/lib/neat/generator.rb +43 -26
  54. data/lib/neat/version.rb +1 -1
  55. data/lib/neat.rb +6 -11
  56. data/neat.gemspec +26 -31
  57. data/package-lock.json +5960 -0
  58. data/package.json +47 -0
  59. data/spec/.keep +0 -0
  60. data/spec/fixtures/_setup.scss +1 -0
  61. data/spec/fixtures/functions/neat-column-default.scss +22 -0
  62. data/spec/fixtures/functions/neat-column-width.scss +30 -0
  63. data/spec/fixtures/functions/neat-float-direction.scss +17 -0
  64. data/spec/fixtures/functions/neat-opposite-direction.scss +17 -0
  65. data/spec/fixtures/functions/neat-parse-media.scss +9 -0
  66. data/spec/fixtures/functions/retrieve-neat-settings.scss +22 -0
  67. data/spec/fixtures/mixins/grid-collapse.scss +14 -0
  68. data/spec/fixtures/mixins/grid-column.scss +57 -0
  69. data/spec/fixtures/mixins/grid-container.scss +5 -0
  70. data/spec/fixtures/mixins/grid-media.scss +45 -0
  71. data/spec/fixtures/mixins/grid-push.scss +38 -0
  72. data/spec/fixtures/mixins/grid-shift.scss +38 -0
  73. data/spec/neat/functions/neat_column_default_spec.rb +35 -0
  74. data/spec/neat/functions/neat_column_width_spec.rb +47 -0
  75. data/spec/neat/functions/neat_float_direction_spec.rb +23 -0
  76. data/spec/neat/functions/neat_opposite_direction_spec.rb +23 -0
  77. data/spec/neat/functions/neat_parse_media_spec.rb +23 -0
  78. data/spec/neat/functions/retrieve_neat_settings_spec.rb +35 -0
  79. data/spec/neat/mixins/grid_collapse_spec.rb +26 -0
  80. data/spec/neat/mixins/grid_column_spec.rb +101 -0
  81. data/spec/neat/mixins/grid_container_spec.rb +17 -0
  82. data/spec/neat/mixins/grid_media_spec.rb +39 -0
  83. data/spec/neat/mixins/grid_push_spec.rb +59 -0
  84. data/spec/neat/mixins/grid_shift_spec.rb +59 -0
  85. data/spec/spec_helper.rb +5 -8
  86. data/spec/support/matchers/be_contained_in.rb +1 -1
  87. data/spec/support/matchers/have_rule.rb +8 -6
  88. data/spec/support/matchers/have_ruleset.rb +20 -0
  89. data/spec/support/matchers/have_value.rb +9 -7
  90. data/spec/support/parser_support.rb +8 -1
  91. data/spec/support/sass_support.rb +3 -3
  92. metadata +98 -148
  93. data/.rspec +0 -2
  94. data/.travis.yml +0 -5
  95. data/NEWS.md +0 -47
  96. data/app/assets/stylesheets/_neat-helpers.scss +0 -8
  97. data/app/assets/stylesheets/_neat.scss +0 -23
  98. data/app/assets/stylesheets/functions/_new-breakpoint.scss +0 -49
  99. data/app/assets/stylesheets/functions/_private.scss +0 -108
  100. data/app/assets/stylesheets/grid/_box-sizing.scss +0 -11
  101. data/app/assets/stylesheets/grid/_direction-context.scss +0 -31
  102. data/app/assets/stylesheets/grid/_display-context.scss +0 -26
  103. data/app/assets/stylesheets/grid/_fill-parent.scss +0 -22
  104. data/app/assets/stylesheets/grid/_media.scss +0 -92
  105. data/app/assets/stylesheets/grid/_omega.scss +0 -91
  106. data/app/assets/stylesheets/grid/_outer-container.scss +0 -36
  107. data/app/assets/stylesheets/grid/_pad.scss +0 -23
  108. data/app/assets/stylesheets/grid/_private.scss +0 -35
  109. data/app/assets/stylesheets/grid/_row.scss +0 -53
  110. data/app/assets/stylesheets/grid/_shift.scss +0 -48
  111. data/app/assets/stylesheets/grid/_span-columns.scss +0 -90
  112. data/app/assets/stylesheets/grid/_to-deprecate.scss +0 -105
  113. data/app/assets/stylesheets/grid/_visual-grid.scss +0 -40
  114. data/app/assets/stylesheets/settings/_disable-warnings.scss +0 -11
  115. data/app/assets/stylesheets/settings/_grid.scss +0 -53
  116. data/app/assets/stylesheets/settings/_visual-grid.scss +0 -25
  117. data/bower.json +0 -22
  118. data/lib/neat/engine.rb +0 -5
  119. data/lib/tasks/install.rake +0 -21
  120. data/sache.json +0 -5
  121. data/spec/neat/columns_spec.rb +0 -73
  122. data/spec/neat/container_spec.rb +0 -21
  123. data/spec/neat/default_spec.rb +0 -15
  124. data/spec/neat/direction_spec.rb +0 -19
  125. data/spec/neat/display_spec.rb +0 -19
  126. data/spec/neat/media_spec.rb +0 -55
  127. data/spec/neat/new_breakpoint_spec.rb +0 -17
  128. data/spec/neat/omega_spec.rb +0 -43
  129. data/spec/neat/pad_spec.rb +0 -32
  130. data/spec/neat/row_spec.rb +0 -39
  131. data/spec/neat/shift_spec.rb +0 -41
  132. data/spec/support/bourbon_support.rb +0 -9
  133. data/test/_setup.scss +0 -3
  134. data/test/default.scss +0 -1
  135. data/test/direction-context.scss +0 -13
  136. data/test/display-context.scss +0 -15
  137. data/test/media.scss +0 -39
  138. data/test/new-breakpoint.scss +0 -13
  139. data/test/omega.scss +0 -25
  140. data/test/outer-container.scss +0 -11
  141. data/test/pad.scss +0 -17
  142. data/test/row.scss +0 -26
  143. data/test/shift.scss +0 -36
  144. data/test/span-columns.scss +0 -21
data/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "bourbon-neat",
3
+ "version": "4.0.0",
4
+ "description": "A lightweight, semantic grid framework",
5
+ "keywords": [
6
+ "columns",
7
+ "grid",
8
+ "layout",
9
+ "media",
10
+ "media-queries",
11
+ "neat",
12
+ "queries",
13
+ "sass",
14
+ "scss",
15
+ "semantic",
16
+ "eyeglass-module"
17
+ ],
18
+ "homepage": "http://neat.bourbon.io",
19
+ "bugs": {
20
+ "url": "https://github.com/thoughtbot/neat/issues"
21
+ },
22
+ "license": "MIT",
23
+ "author": {
24
+ "name": "thoughtbot",
25
+ "url": "http://thoughtbot.com"
26
+ },
27
+ "main": "index.js",
28
+ "style": "core/_neat.scss",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/thoughtbot/neat.git"
32
+ },
33
+ "scripts": {
34
+ "contrib": "gulp",
35
+ "test": "bundle exec rake"
36
+ },
37
+ "devDependencies": {
38
+ "browser-sync": "^2.24.6",
39
+ "gulp": "^4.0.0",
40
+ "gulp-sass": "^4.0.1"
41
+ },
42
+ "eyeglass": {
43
+ "name": "neat",
44
+ "needs": "*",
45
+ "exports": "eyeglass-exports.js"
46
+ }
47
+ }
data/spec/.keep ADDED
File without changes
@@ -0,0 +1 @@
1
+ @import "core/neat";
@@ -0,0 +1,22 @@
1
+ @import "setup";
2
+
3
+ $eighteen-grid: (
4
+ columns: 18,
5
+ gutter: 33px,
6
+ );
7
+
8
+ .neat-column-default-grid {
9
+ content: _neat-column-default($neat-grid, null);
10
+ }
11
+
12
+ .neat-column-default-grid-custom-col {
13
+ content: _neat-column-default($neat-grid, 10);
14
+ }
15
+
16
+ .neat-column-custom-grid {
17
+ content: _neat-column-default($eighteen-grid, null);
18
+ }
19
+
20
+ .neat-column-custom-grid-custom-col {
21
+ content: _neat-column-default($eighteen-grid, 10);
22
+ }
@@ -0,0 +1,30 @@
1
+ @import "setup";
2
+
3
+ $six-grid: (
4
+ columns: 6,
5
+ gutter: 10px
6
+ );
7
+
8
+ .neat-column-width-1-of-12 {
9
+ width: calc(#{_neat-column-width($neat-grid, 1)});
10
+ }
11
+
12
+ .neat-column-width-6-of-12 {
13
+ width: calc(#{_neat-column-width($neat-grid, 6)});
14
+ }
15
+
16
+ .neat-column-width-12-of-12 {
17
+ width: calc(#{_neat-column-width($neat-grid, 12)});
18
+ }
19
+
20
+ .neat-column-width-1-of-6 {
21
+ width: calc(#{_neat-column-width($six-grid, 1)});
22
+ }
23
+
24
+ .neat-column-width-2-of-6 {
25
+ width: calc(#{_neat-column-width($six-grid, 2)});
26
+ }
27
+
28
+ .neat-column-width-6-of-6 {
29
+ width: calc(#{_neat-column-width($six-grid, 6)});
30
+ }
@@ -0,0 +1,17 @@
1
+ @import "setup";
2
+
3
+ $ltr-grid: (
4
+ direction: ltr,
5
+ );
6
+
7
+ $rtl-grid: (
8
+ direction: rtl,
9
+ );
10
+
11
+ .neat-float-direction-ltr {
12
+ content: _neat-float-direction($ltr-grid);
13
+ }
14
+
15
+ .neat-float-direction-rtl {
16
+ content: _neat-float-direction($rtl-grid);
17
+ }
@@ -0,0 +1,17 @@
1
+ @import "setup";
2
+
3
+ $ltr-grid: (
4
+ direction: ltr,
5
+ );
6
+
7
+ $rtl-grid: (
8
+ direction: rtl,
9
+ );
10
+
11
+ .neat-opposite-direction-ltr {
12
+ content: _neat-opposite-direction($ltr-grid);
13
+ }
14
+
15
+ .neat-opposite-direction-rtl {
16
+ content: _neat-opposite-direction($rtl-grid);
17
+ }
@@ -0,0 +1,9 @@
1
+ @import "setup";
2
+
3
+ .neat-parse-media-number {
4
+ content: _neat-parse-media(100px);
5
+ }
6
+
7
+ .neat-parse-media-string {
8
+ content: _neat-parse-media("only screen and (max-width: 25rem)");
9
+ }
@@ -0,0 +1,22 @@
1
+ @import "setup";
2
+
3
+ $eighteen-grid: (
4
+ columns: 18,
5
+ gutter: 33px
6
+ );
7
+
8
+ .neat-settings-default-columns {
9
+ content: _retrieve-neat-setting($neat-grid, columns);
10
+ }
11
+
12
+ .neat-settings-default-gutter {
13
+ content: _retrieve-neat-setting($neat-grid, gutter);
14
+ }
15
+
16
+ .neat-settings-eighteen-columns {
17
+ content: _retrieve-neat-setting($eighteen-grid, columns);
18
+ }
19
+
20
+ .neat-settings-eighteen-gutter {
21
+ content: _retrieve-neat-setting($eighteen-grid, gutter);
22
+ }
@@ -0,0 +1,14 @@
1
+ @import "setup";
2
+
3
+ $custom-grid: (
4
+ columns: 6,
5
+ gutter: 4rem,
6
+ );
7
+
8
+ .grid-collapse-default {
9
+ @include grid-collapse;
10
+ }
11
+
12
+ .grid-collapse-custom {
13
+ @include grid-collapse($custom-grid);
14
+ }
@@ -0,0 +1,57 @@
1
+ @import "setup";
2
+
3
+ $six-grid: (
4
+ columns: 6,
5
+ gutter: 1em,
6
+ );
7
+
8
+ $seventeen-grid: (
9
+ columns: 17,
10
+ gutter: 10px,
11
+ );
12
+
13
+ .grid-column-1-of-default {
14
+ @include grid-column(1);
15
+ }
16
+
17
+ .grid-column-6-of-default {
18
+ @include grid-column(6);
19
+ }
20
+
21
+ .grid-column-12-of-default {
22
+ @include grid-column(12);
23
+ }
24
+
25
+ .grid-column-3-of-5-shorthand {
26
+ @include grid-column(3 of 5);
27
+ }
28
+
29
+ .grid-column-1-of-6 {
30
+ @include grid-column(1, $six-grid);
31
+ }
32
+
33
+ .grid-column-4-of-6 {
34
+ @include grid-column(4, $six-grid);
35
+ }
36
+
37
+ .grid-column-6-of-6 {
38
+ @include grid-column(6, $six-grid);
39
+ }
40
+
41
+ .grid-column-3-of-5-shorthand-six-grid {
42
+ @include grid-column(3 of 5, $six-grid);
43
+ }
44
+
45
+ .grid-column-5-of-17 {
46
+ @include grid-column(1, $seventeen-grid);
47
+ }
48
+
49
+ .grid-column-11-of-17 {
50
+ @include grid-column(6, $seventeen-grid);
51
+ }
52
+
53
+ .grid-column-13-of-17 {
54
+ @include grid-column(12, $seventeen-grid);
55
+ }
56
+
57
+
@@ -0,0 +1,5 @@
1
+ @import "setup";
2
+
3
+ .grid-container {
4
+ @include grid-container;
5
+ }
@@ -0,0 +1,45 @@
1
+ @import "setup";
2
+
3
+ $medium-screen: 1000px;
4
+
5
+ $custom-neat-grid: (
6
+ columns: 12,
7
+ gutter: 50px,
8
+ media: $medium-screen,
9
+ );
10
+
11
+ $specific-neat-grid: (
12
+ columns: 12,
13
+ gutter: 80px,
14
+ media: "only screen and (min-width: 1000px) and (max-width: 1100px)",
15
+ );
16
+
17
+ $print-neat-grid: (
18
+ columns: 10,
19
+ gutter: 20px,
20
+ media: print,
21
+ );
22
+
23
+ .grid-column-media-custom-neat-grid {
24
+ @include grid-media($custom-neat-grid) {
25
+ @include grid-column(3);
26
+ }
27
+ }
28
+
29
+ .grid-column-media-specific-neat-grid {
30
+ @include grid-media($specific-neat-grid) {
31
+ @include grid-column(6);
32
+ }
33
+ }
34
+
35
+ .grid-column-media-print-neat-grid {
36
+ @include grid-media($print-neat-grid) {
37
+ @include grid-column(8);
38
+ }
39
+ }
40
+
41
+ .grid-column-media-combined-grid {
42
+ @include grid-media($custom-neat-grid, $specific-neat-grid, $print-neat-grid) {
43
+ @include grid-column(3);
44
+ }
45
+ }
@@ -0,0 +1,38 @@
1
+ @import "setup";
2
+
3
+ $six-grid: (
4
+ columns: 6,
5
+ gutter: 2rem,
6
+ );
7
+
8
+ .grid-push-default {
9
+ @include grid-push;
10
+ }
11
+
12
+ .grid-push-1-default {
13
+ @include grid-push(1);
14
+ }
15
+
16
+ .grid-push-6-default {
17
+ @include grid-push(6);
18
+ }
19
+
20
+ .grid-push-neg-6-default {
21
+ @include grid-push(-6);
22
+ }
23
+
24
+ .grid-push-0-six {
25
+ @include grid-push(false, $six-grid);
26
+ }
27
+
28
+ .grid-push-1-six {
29
+ @include grid-push(1, $six-grid);
30
+ }
31
+
32
+ .grid-push-3-six {
33
+ @include grid-push(3, $six-grid);
34
+ }
35
+
36
+ .grid-push-neg-3-six {
37
+ @include grid-push(-3, $six-grid);
38
+ }
@@ -0,0 +1,38 @@
1
+ @import "setup";
2
+
3
+ $six-grid: (
4
+ columns: 6,
5
+ gutter: 2rem,
6
+ );
7
+
8
+ .grid-shift-default {
9
+ @include grid-shift;
10
+ }
11
+
12
+ .grid-shift-1-default {
13
+ @include grid-shift(1);
14
+ }
15
+
16
+ .grid-shift-6-default {
17
+ @include grid-shift(6);
18
+ }
19
+
20
+ .grid-shift-neg-6-default {
21
+ @include grid-shift(-6);
22
+ }
23
+
24
+ .grid-shift-0-six {
25
+ @include grid-shift(false, $six-grid);
26
+ }
27
+
28
+ .grid-shift-1-six {
29
+ @include grid-shift(1, $six-grid);
30
+ }
31
+
32
+ .grid-shift-3-six {
33
+ @include grid-shift(3, $six-grid);
34
+ }
35
+
36
+ .grid-shift-neg-3-six {
37
+ @include grid-shift(-3, $six-grid);
38
+ }
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ describe "neat-column-default" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("functions/neat-column-default")
6
+ end
7
+
8
+ context "called with default grid" do
9
+ it "gets default columns" do
10
+ rule = "content: 12"
11
+
12
+ expect(".neat-column-default-grid").to have_rule(rule)
13
+ end
14
+
15
+ it "gets custom columns" do
16
+ rule = "content: 10"
17
+
18
+ expect(".neat-column-default-grid-custom-col").to have_rule(rule)
19
+ end
20
+ end
21
+
22
+ context "called with custom grid" do
23
+ it "gets default columns" do
24
+ rule = "content: 18"
25
+
26
+ expect(".neat-column-custom-grid").to have_rule(rule)
27
+ end
28
+
29
+ it "gets custom columns" do
30
+ rule = "content: 10"
31
+
32
+ expect(".neat-column-custom-grid-custom-col").to have_rule(rule)
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,47 @@
1
+ require "spec_helper"
2
+
3
+ describe "neat-column-width" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("functions/neat-column-width")
6
+ end
7
+
8
+ context "called with a default twelve column grid" do
9
+ it "applies one column" do
10
+ rule = "width: calc(8.33333% - 21.66667px)"
11
+
12
+ expect(".neat-column-width-1-of-12").to have_rule(rule)
13
+ end
14
+
15
+ it "applies six columns" do
16
+ rule = "width: calc(50% - 30px)"
17
+
18
+ expect(".neat-column-width-6-of-12").to have_rule(rule)
19
+ end
20
+
21
+ it "applies twelve columns" do
22
+ rule = "width: calc(100% - 40px)"
23
+
24
+ expect(".neat-column-width-12-of-12").to have_rule(rule)
25
+ end
26
+ end
27
+
28
+ context "called with a custom 6 column grid" do
29
+ it "applies one column" do
30
+ rule = "width: calc(16.66667% - 11.66667px)"
31
+
32
+ expect(".neat-column-width-1-of-6").to have_rule(rule)
33
+ end
34
+
35
+ it "applies six columns" do
36
+ rule = "width: calc(33.33333% - 13.33333px)"
37
+
38
+ expect(".neat-column-width-2-of-6").to have_rule(rule)
39
+ end
40
+
41
+ it "applies twelve columns" do
42
+ rule = "width: calc(100% - 20px)"
43
+
44
+ expect(".neat-column-width-6-of-6").to have_rule(rule)
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,23 @@
1
+ require "spec_helper"
2
+
3
+ describe "neat-float-direction" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("functions/neat-float-direction")
6
+ end
7
+
8
+ context "called with ltr" do
9
+ it "returns left" do
10
+ rule = "content: left"
11
+
12
+ expect(".neat-float-direction-ltr").to have_rule(rule)
13
+ end
14
+ end
15
+
16
+ context "called with rtl" do
17
+ it "returns right" do
18
+ rule = "content: right"
19
+
20
+ expect(".neat-float-direction-rtl").to have_rule(rule)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ require "spec_helper"
2
+
3
+ describe "neat-opposite-direction" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("functions/neat-opposite-direction")
6
+ end
7
+
8
+ context "called with ltr" do
9
+ it "returns right" do
10
+ rule = "content: right"
11
+
12
+ expect(".neat-opposite-direction-ltr").to have_rule(rule)
13
+ end
14
+ end
15
+
16
+ context "called with rtl" do
17
+ it "returns left" do
18
+ rule = "content: left"
19
+
20
+ expect(".neat-opposite-direction-rtl").to have_rule(rule)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ require "spec_helper"
2
+
3
+ describe "neat-parse-media" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("functions/neat-parse-media")
6
+ end
7
+
8
+ context "called with number" do
9
+ it "gets min-width wraped number" do
10
+ rule = 'content: "only screen and (min-width: 100px)"'
11
+
12
+ expect(".neat-parse-media-number").to have_rule(rule)
13
+ end
14
+ end
15
+
16
+ context "called with string" do
17
+ it "gets the string" do
18
+ rule = 'content: "only screen and (max-width: 25rem)"'
19
+
20
+ expect(".neat-parse-media-string").to have_rule(rule)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,35 @@
1
+ require "spec_helper"
2
+
3
+ describe "retrieve-neat-settings" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("functions/retrieve-neat-settings")
6
+ end
7
+
8
+ context "called with default settings" do
9
+ it "gets default columns" do
10
+ rule = "content: 12"
11
+
12
+ expect(".neat-settings-default-columns").to have_rule(rule)
13
+ end
14
+
15
+ it "gets default gutter" do
16
+ rule = "content: 20px"
17
+
18
+ expect(".neat-settings-default-gutter").to have_rule(rule)
19
+ end
20
+ end
21
+
22
+ context "called with custom settings" do
23
+ it "gets default columns" do
24
+ rule = "content: 18"
25
+
26
+ expect(".neat-settings-eighteen-columns").to have_rule(rule)
27
+ end
28
+
29
+ it "gets default gutter" do
30
+ rule = "content: 33px"
31
+
32
+ expect(".neat-settings-eighteen-gutter").to have_rule(rule)
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,26 @@
1
+ require "spec_helper"
2
+
3
+ describe "grid-collapse" do
4
+ before(:all) do
5
+ ParserSupport.parse_file("mixins/grid-collapse")
6
+ end
7
+
8
+ context "called with default settings" do
9
+ it "adds margin for just the gutter with no specified column" do
10
+ ruleset = "margin-left: -20px; " +
11
+ "margin-right: -20px; " +
12
+ "width: calc(100% + 40px);"
13
+ expect(".grid-collapse-default").to have_ruleset(ruleset)
14
+ end
15
+ end
16
+
17
+ context "called with custom settings" do
18
+ it "adds margin for just the gutter with no specified column" do
19
+ ruleset = "margin-left: -4rem; " +
20
+ "margin-right: -4rem; " +
21
+ "width: calc(100% + 8rem);"
22
+
23
+ expect(".grid-collapse-custom").to have_ruleset(ruleset)
24
+ end
25
+ end
26
+ end