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.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -4
  3. data/.hound.yml +5 -0
  4. data/.npmignore +0 -4
  5. data/.scss-lint.yml +3 -1
  6. data/CHANGELOG.md +45 -23
  7. data/CONTRIBUTING.md +12 -0
  8. data/Gemfile +1 -2
  9. data/Gulpfile.js +5 -6
  10. data/LICENSE.md +1 -1
  11. data/README.md +26 -163
  12. data/RELEASING.md +27 -0
  13. data/Rakefile +3 -13
  14. data/bower.json +8 -9
  15. data/circle.yml +13 -0
  16. data/contrib/base/_grids.scss +4 -0
  17. data/contrib/base/_variables.scss +8 -0
  18. data/contrib/index.html +68 -223
  19. data/contrib/patterns/_box.scss +11 -0
  20. data/contrib/patterns/_global.scss +5 -0
  21. data/contrib/patterns/_grid-media.scss +52 -0
  22. data/contrib/patterns/_grid-nested.scss +7 -0
  23. data/contrib/patterns/_grid-push.scss +7 -0
  24. data/contrib/patterns/_grid-shift.scss +7 -0
  25. data/contrib/patterns/_grid.scss +31 -0
  26. data/contrib/styles.scss +12 -293
  27. data/core/_neat.scss +20 -0
  28. data/core/neat/functions/_neat-column-default.scss +23 -0
  29. data/core/neat/functions/_neat-column-ratio.scss +24 -0
  30. data/core/neat/functions/_neat-column-width.scss +25 -0
  31. data/core/neat/functions/_neat-parse-columns.scss +22 -0
  32. data/core/neat/functions/_neat-parse-media.scss +20 -0
  33. data/core/neat/functions/_retrieve-neat-settings.scss +18 -0
  34. data/core/neat/mixins/_grid-column.scss +29 -0
  35. data/{app/assets/stylesheets/mixins/_clearfix.scss → core/neat/mixins/_grid-container.scss} +5 -5
  36. data/core/neat/mixins/_grid-media.scss +50 -0
  37. data/core/neat/mixins/_grid-push.scss +32 -0
  38. data/core/neat/mixins/_grid-shift.scss +31 -0
  39. data/core/neat/settings/_settings.scss +41 -0
  40. data/index.js +1 -1
  41. data/lib/neat.rb +5 -18
  42. data/lib/neat/generator.rb +1 -1
  43. data/lib/neat/version.rb +1 -1
  44. data/neat.gemspec +27 -33
  45. data/package.json +5 -4
  46. data/spec/.keep +0 -0
  47. data/spec/fixtures/_setup.scss +1 -0
  48. data/spec/fixtures/functions/neat-column-default.scss +22 -0
  49. data/spec/fixtures/functions/neat-column-width.scss +30 -0
  50. data/spec/fixtures/functions/neat-parse-media.scss +9 -0
  51. data/spec/fixtures/functions/retrieve-neat-settings.scss +22 -0
  52. data/spec/fixtures/mixins/grid-column.scss +57 -0
  53. data/spec/fixtures/mixins/grid-container.scss +5 -0
  54. data/spec/fixtures/mixins/grid-push.scss +38 -0
  55. data/spec/fixtures/mixins/grid-shift.scss +38 -0
  56. data/spec/neat/functions/neat_column_default_spec.rb +35 -0
  57. data/spec/neat/functions/neat_column_width_spec.rb +47 -0
  58. data/spec/neat/functions/neat_parse_media_spec.rb +23 -0
  59. data/spec/neat/functions/retrieve_neat_settings_spec.rb +35 -0
  60. data/spec/neat/mixins/grid_column_spec.rb +101 -0
  61. data/spec/neat/mixins/grid_container_spec.rb +17 -0
  62. data/spec/neat/mixins/grid_push_spec.rb +59 -0
  63. data/spec/neat/mixins/grid_shift_spec.rb +59 -0
  64. data/spec/support/matchers/have_ruleset.rb +20 -0
  65. data/spec/support/matchers/have_value.rb +9 -7
  66. data/spec/support/parser_support.rb +8 -1
  67. data/spec/support/sass_support.rb +1 -1
  68. metadata +76 -153
  69. data/.rspec +0 -1
  70. data/.ruby-version +0 -1
  71. data/.travis.yml +0 -10
  72. data/app/assets/stylesheets/_neat-helpers.scss +0 -11
  73. data/app/assets/stylesheets/_neat.scss +0 -24
  74. data/app/assets/stylesheets/functions/_new-breakpoint.scss +0 -49
  75. data/app/assets/stylesheets/functions/_private.scss +0 -154
  76. data/app/assets/stylesheets/grid/_box-sizing.scss +0 -15
  77. data/app/assets/stylesheets/grid/_direction-context.scss +0 -33
  78. data/app/assets/stylesheets/grid/_display-context.scss +0 -28
  79. data/app/assets/stylesheets/grid/_fill-parent.scss +0 -22
  80. data/app/assets/stylesheets/grid/_media.scss +0 -92
  81. data/app/assets/stylesheets/grid/_omega.scss +0 -112
  82. data/app/assets/stylesheets/grid/_outer-container.scss +0 -34
  83. data/app/assets/stylesheets/grid/_pad.scss +0 -25
  84. data/app/assets/stylesheets/grid/_private.scss +0 -35
  85. data/app/assets/stylesheets/grid/_reset-display.scss +0 -14
  86. data/app/assets/stylesheets/grid/_row.scss +0 -45
  87. data/app/assets/stylesheets/grid/_shift.scss +0 -50
  88. data/app/assets/stylesheets/grid/_span-columns.scss +0 -94
  89. data/app/assets/stylesheets/grid/_to-deprecate.scss +0 -81
  90. data/app/assets/stylesheets/grid/_visual-grid.scss +0 -42
  91. data/app/assets/stylesheets/settings/_disable-warnings.scss +0 -13
  92. data/app/assets/stylesheets/settings/_grid.scss +0 -51
  93. data/app/assets/stylesheets/settings/_visual-grid.scss +0 -27
  94. data/lib/neat/engine.rb +0 -5
  95. data/lib/tasks/install.rake +0 -19
  96. data/sache.json +0 -5
  97. data/spec/neat/columns_spec.rb +0 -73
  98. data/spec/neat/container_spec.rb +0 -21
  99. data/spec/neat/default_spec.rb +0 -15
  100. data/spec/neat/direction_spec.rb +0 -19
  101. data/spec/neat/display_spec.rb +0 -19
  102. data/spec/neat/media_spec.rb +0 -55
  103. data/spec/neat/new_breakpoint_spec.rb +0 -17
  104. data/spec/neat/omega_spec.rb +0 -66
  105. data/spec/neat/pad_spec.rb +0 -32
  106. data/spec/neat/row_spec.rb +0 -39
  107. data/spec/neat/shift_spec.rb +0 -41
  108. data/test/_setup.scss +0 -2
  109. data/test/default.scss +0 -1
  110. data/test/direction-context.scss +0 -13
  111. data/test/display-context.scss +0 -15
  112. data/test/media.scss +0 -39
  113. data/test/new-breakpoint.scss +0 -13
  114. data/test/omega.scss +0 -29
  115. data/test/outer-container.scss +0 -11
  116. data/test/pad.scss +0 -17
  117. data/test/row.scss +0 -26
  118. data/test/shift.scss +0 -36
  119. data/test/span-columns.scss +0 -21
@@ -1,32 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "@include pad()" do
4
- before(:all) do
5
- ParserSupport.parse_file("pad")
6
- end
7
-
8
- context "with no argument" do
9
- it "sets padding to gutter percentage" do
10
- expect(".pad-default").to have_rule("padding: 2.35765%")
11
- end
12
- end
13
-
14
- context "with argument (20px)" do
15
- it "sets padding to 20px" do
16
- expect(".pad-explicit").to have_rule("padding: 20px")
17
- end
18
- end
19
-
20
- context "with argument (30px 20px 10px 5px)" do
21
- it "sets padding to 30px 20px 10px 5px" do
22
- expect(".pad-shorthand").to have_rule("padding: 30px 20px 10px 5px")
23
- end
24
- end
25
-
26
- context "with argument (default)" do
27
- it "uses default gutter percentage" do
28
- expect(".pad-shorthand-default").to have_rule("padding: 30px 2.35765% 10px 2.35765%")
29
- end
30
- end
31
- end
32
-
@@ -1,39 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "@include row()" do
4
- before(:all) do
5
- ParserSupport.parse_file("row")
6
- end
7
-
8
- context "with no argument" do
9
- it "adds clearfix" do
10
- expect(".row-default::after").to have_rule("clear: both")
11
- end
12
-
13
- it "sets display to block" do
14
- expect(".row-default").to have_rule("display: block")
15
- end
16
- end
17
-
18
- context "with argument (table)" do
19
- it "sets display to table" do
20
- expect(".row-table").to have_rule("display: table")
21
- end
22
-
23
- it "forces table-cell display on child elements" do
24
- expect(".row-table-reset .block-child").to have_rule("display: table-cell")
25
- end
26
- end
27
-
28
- context "with reset-display()" do
29
- it "resets display to block" do
30
- expect(".no-row").to have_rule("display: block")
31
- end
32
- end
33
-
34
- context "with invalid display argument" do
35
- it "sets display to block" do
36
- expect(".row-invalid-display").to have_rule("display: block")
37
- end
38
- end
39
- end
@@ -1,41 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "@include shift()" do
4
- before(:all) do
5
- ParserSupport.parse_file("shift")
6
- end
7
-
8
- context "with no argument" do
9
- it "shifts element one column in the default direction" do
10
- expect(".shift-default").to have_rule("margin-left: 8.5298%")
11
- end
12
- end
13
-
14
- context "with argument (2)" do
15
- it "shifts element 2 columns in the default direction" do
16
- expect(".shift-positive").to have_rule("margin-left: 17.05961%")
17
- end
18
- end
19
-
20
- context "with argument (-3)" do
21
- it "shifts element 3 columns in the opposite direction" do
22
- expect(".shift-negative").to have_rule("margin-left: -25.58941%")
23
- end
24
- end
25
-
26
- context "when nested" do
27
- it "shifts element relative to its parent" do
28
- expect(".shifted-parent .shifted-child").to have_rule("margin-left: 34.94305%")
29
- end
30
-
31
- it "resets nesting context" do
32
- expect(".post-nested-shift").to have_rule("margin-left: 17.05961%")
33
- end
34
- end
35
-
36
- context "when layout direction changes" do
37
- it "shifts element in the corresponding direction" do
38
- expect("section .shift-negative").to have_rule("margin-right: -25.58941%")
39
- end
40
- end
41
- end
@@ -1,2 +0,0 @@
1
- @import "../app/assets/stylesheets/neat";
2
- $disable-warnings: true !global;
@@ -1 +0,0 @@
1
- @import "setup";
@@ -1,13 +0,0 @@
1
- @import "setup";
2
-
3
- @include direction-context() {
4
- .default-block {
5
- @include span-columns(6);
6
- }
7
- }
8
-
9
- @include direction-context(right-to-left) {
10
- .right-to-left-block {
11
- @include span-columns(6);
12
- }
13
- }
@@ -1,15 +0,0 @@
1
- @import "setup";
2
-
3
- @include display-context(table) {
4
- .display-table-block {
5
- @include span-columns(6);
6
- }
7
- }
8
-
9
- @include display-context(table) {
10
- @include display-context(block) {
11
- .display-nested-block {
12
- @include span-columns(6);
13
- }
14
- }
15
- }
@@ -1,39 +0,0 @@
1
- @import "setup";
2
-
3
- $composite: new-breakpoint(max-width 768px min-width 110px orientation portait 6);
4
-
5
- .media-default {
6
- @include media(481px) {
7
- color: #000;
8
- }
9
- }
10
-
11
- .media-max-width {
12
- @include media(max-width 480px) {
13
- position: relative;
14
- }
15
- }
16
-
17
- .media-min-max-width {
18
- @include media(min-width 320px max-width 480px) {
19
- position: relative;
20
- }
21
- }
22
-
23
- .change-media-context {
24
- @include media(481px, 6) {
25
- @include span-columns(6);
26
- }
27
- }
28
-
29
- .change-media-context-shorthand {
30
- @include media(max-width 480px 6) {
31
- @include span-columns(6);
32
- }
33
- }
34
-
35
- .composite-media-query {
36
- @include media($composite) {
37
- @include span-columns(6);
38
- }
39
- }
@@ -1,13 +0,0 @@
1
- @import "setup";
2
-
3
- $tablet: new-breakpoint(max-width 768px 12);
4
-
5
- .responsive-element {
6
- @include media($tablet) {
7
- color: #000;
8
- }
9
- }
10
-
11
- #visual-grid-breakpoints {
12
- value: $visual-grid-breakpoints
13
- }
@@ -1,29 +0,0 @@
1
- @import "setup";
2
-
3
- .omega-default {
4
- @include omega;
5
- }
6
-
7
- .omega-nth-default {
8
- @include omega(4n)
9
- }
10
-
11
- .omega-complex-nth {
12
- @include omega("4n+1");
13
- }
14
-
15
- .omega-complex-nth-negative {
16
- @include omega("3n-1");
17
- }
18
-
19
- section {
20
- @include row($direction: RTL);
21
-
22
- .omega-default-left {
23
- @include omega;
24
- }
25
-
26
- .omega-nth-default-left {
27
- @include omega(4n block);
28
- }
29
- }
@@ -1,11 +0,0 @@
1
- @import "setup";
2
-
3
- $max-width: 960px;
4
-
5
- .container-default {
6
- @include outer-container();
7
- }
8
-
9
- .container-custom-width {
10
- @include outer-container(100%);
11
- }
@@ -1,17 +0,0 @@
1
- @import "setup";
2
-
3
- .pad-default {
4
- @include pad;
5
- }
6
-
7
- .pad-explicit {
8
- @include pad(20px);
9
- }
10
-
11
- .pad-shorthand {
12
- @include pad(30px 20px 10px 5px);
13
- }
14
-
15
- .pad-shorthand-default {
16
- @include pad(30px default 10px default);
17
- }
@@ -1,26 +0,0 @@
1
- @import "setup";
2
-
3
- .row-default {
4
- @include row;
5
- }
6
-
7
- .row-table {
8
- @include row(table);
9
- }
10
-
11
- .row-invalid-display {
12
- @include row(invalid-argument);
13
- }
14
-
15
- .row-table-reset {
16
- @include row(table);
17
-
18
- .block-child {
19
- @include span-columns(4, block);
20
- @include reset-display;
21
- }
22
- }
23
-
24
- .no-row {
25
- @include span-columns(4);
26
- }
@@ -1,36 +0,0 @@
1
- @import "setup";
2
-
3
- .shift-default {
4
- @include shift;
5
- }
6
-
7
- .shift-positive {
8
- @include shift(2);
9
- }
10
-
11
- .shift-negative {
12
- @include shift(-3);
13
- }
14
-
15
- // Nesting
16
- .shifted-parent {
17
- @include span-columns(6);
18
-
19
- .shifted-child {
20
- @include shift(2 of 6);
21
- }
22
- }
23
-
24
- .post-nested-shift {
25
- @include shift(2);
26
- }
27
-
28
- // Changing direction
29
- section {
30
- @include row($direction: RTL);
31
-
32
- .shift-negative {
33
- @include shift(-3);
34
- @include reset-layout-direction;
35
- }
36
- }
@@ -1,21 +0,0 @@
1
- @import "setup";
2
-
3
- .span-columns-default {
4
- @include span-columns(6);
5
-
6
- .span-columns-nested {
7
- @include span-columns(2 of 6);
8
- }
9
- }
10
-
11
- .span-columns-table {
12
- @include span-columns(6, table);
13
- }
14
-
15
- .span-columns-collapse {
16
- @include span-columns(6, block-collapse);
17
- }
18
-
19
- .span-columns-no-display {
20
- @include span-columns(6, no-display);
21
- }