flint-gs 2.3.6 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -21
  3. data/README.md +99 -98
  4. data/lib/flint-gs.rb +8 -0
  5. data/lib/flint.rb +22 -16
  6. data/lib/flint/functions.rb +99 -99
  7. data/lib/flint/version.rb +3 -3
  8. data/stylesheets/_flint.scss +7 -7
  9. data/stylesheets/flint/config/_config.scss +56 -56
  10. data/stylesheets/flint/functions/_functions.scss +48 -48
  11. data/stylesheets/flint/functions/helpers/_helpers.scss +229 -229
  12. data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +47 -47
  13. data/stylesheets/flint/functions/lib/_calc-width.scss +70 -70
  14. data/stylesheets/flint/functions/lib/_fluid-width.scss +15 -15
  15. data/stylesheets/flint/functions/lib/_get-index.scss +21 -21
  16. data/stylesheets/flint/functions/lib/_get-instance-value.scss +15 -15
  17. data/stylesheets/flint/functions/lib/_get-value.scss +14 -14
  18. data/stylesheets/flint/functions/lib/_has-family-instance.scss +84 -84
  19. data/stylesheets/flint/functions/lib/_html-encode.scss +14 -14
  20. data/stylesheets/flint/functions/lib/_instance.scss +48 -48
  21. data/stylesheets/flint/functions/lib/_last.scss +14 -14
  22. data/stylesheets/flint/functions/lib/_list-to-str.scss +38 -38
  23. data/stylesheets/flint/functions/lib/_map-fetch.scss +31 -31
  24. data/stylesheets/flint/functions/lib/_next-index.scss +14 -14
  25. data/stylesheets/flint/functions/lib/_purge.scss +24 -24
  26. data/stylesheets/flint/functions/lib/_remove.scss +18 -18
  27. data/stylesheets/flint/functions/lib/_replace.scss +30 -30
  28. data/stylesheets/flint/functions/lib/_steal-key.scss +32 -32
  29. data/stylesheets/flint/functions/lib/_steal-values.scss +15 -15
  30. data/stylesheets/flint/functions/lib/_str-replace.scss +39 -39
  31. data/stylesheets/flint/functions/lib/_str-to-list.scss +89 -89
  32. data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +37 -37
  33. data/stylesheets/flint/functions/lib/_support-syntax.scss +31 -31
  34. data/stylesheets/flint/functions/lib/_types-in-list.scss +76 -76
  35. data/stylesheets/flint/functions/lib/_use-syntax.scss +22 -22
  36. data/stylesheets/flint/globals/_globals.scss +122 -122
  37. data/stylesheets/flint/mixins/_mixins.scss +11 -11
  38. data/stylesheets/flint/mixins/lib/_box-sizing.scss +18 -18
  39. data/stylesheets/flint/mixins/lib/_calculate.scss +241 -241
  40. data/stylesheets/flint/mixins/lib/_clearfix.scss +29 -29
  41. data/stylesheets/flint/mixins/lib/_container.scss +45 -45
  42. data/stylesheets/flint/mixins/lib/_grid-overlay.scss +73 -73
  43. data/stylesheets/flint/mixins/lib/_main.scss +1057 -1057
  44. data/stylesheets/flint/mixins/lib/_new-instance.scss +28 -28
  45. data/stylesheets/flint/mixins/lib/_print-instance.scss +44 -44
  46. data/tests/config.rb +22 -34
  47. data/tests/input/functions/_functions.scss +47 -47
  48. data/tests/input/functions/helpers/_helpers.scss +437 -437
  49. data/tests/input/functions/lib/_calc-breakpoint.scss +62 -62
  50. data/tests/input/functions/lib/_calc-width.scss +195 -195
  51. data/tests/input/functions/lib/_fluid-width.scss +32 -32
  52. data/tests/input/functions/lib/_get-index.scss +31 -31
  53. data/tests/input/functions/lib/_get-instance-value.scss +72 -72
  54. data/tests/input/functions/lib/_get-value.scss +28 -28
  55. data/tests/input/functions/lib/_has-family-instance.scss +35 -35
  56. data/tests/input/functions/lib/_instance.scss +187 -187
  57. data/tests/input/functions/lib/_last.scss +18 -18
  58. data/tests/input/functions/lib/_list-to-str.scss +28 -28
  59. data/tests/input/functions/lib/_map-fetch.scss +34 -34
  60. data/tests/input/functions/lib/_next-index.scss +24 -24
  61. data/tests/input/functions/lib/_purge.scss +14 -14
  62. data/tests/input/functions/lib/_remove.scss +14 -14
  63. data/tests/input/functions/lib/_replace.scss +14 -14
  64. data/tests/input/functions/lib/_steal-key.scss +19 -19
  65. data/tests/input/functions/lib/_steal-values.scss +16 -16
  66. data/tests/input/functions/lib/_str-replace.scss +14 -14
  67. data/tests/input/functions/lib/_str-to-list.scss +28 -28
  68. data/tests/input/functions/lib/_support-syntax-bem.scss +14 -14
  69. data/tests/input/functions/lib/_support-syntax.scss +21 -21
  70. data/tests/input/functions/lib/_types-in-list.scss +50 -50
  71. data/tests/input/functions/lib/_use-syntax.scss +14 -14
  72. data/tests/input/output.scss +250 -250
  73. data/tests/output/output.css +3499 -3499
  74. data/tests/tests.html +110 -110
  75. metadata +12 -212
  76. data/tests/bootcamp/CHANGELOG.md +0 -70
  77. data/tests/bootcamp/CONTRIBUTING.md +0 -72
  78. data/tests/bootcamp/Gruntfile.coffee +0 -34
  79. data/tests/bootcamp/LICENSE.md +0 -7
  80. data/tests/bootcamp/README.md +0 -52
  81. data/tests/bootcamp/bower.json +0 -15
  82. data/tests/bootcamp/dist/_bootcamp.scss +0 -46
  83. data/tests/bootcamp/dist/bootcamp.coffee +0 -101
  84. data/tests/bootcamp/dist/core/functions/_actual.scss +0 -3
  85. data/tests/bootcamp/dist/core/functions/_error.scss +0 -29
  86. data/tests/bootcamp/dist/core/functions/_expect.scss +0 -6
  87. data/tests/bootcamp/dist/core/functions/_not-to.scss +0 -5
  88. data/tests/bootcamp/dist/core/functions/_should.scss +0 -6
  89. data/tests/bootcamp/dist/core/functions/_to.scss +0 -5
  90. data/tests/bootcamp/dist/core/mixins/_describe.scss +0 -31
  91. data/tests/bootcamp/dist/core/mixins/_it.scss +0 -31
  92. data/tests/bootcamp/dist/core/mixins/_runner.scss +0 -28
  93. data/tests/bootcamp/dist/core/mixins/_should.scss +0 -46
  94. data/tests/bootcamp/dist/core/mixins/_xdescribe.scss +0 -9
  95. data/tests/bootcamp/dist/core/mixins/_xit.scss +0 -9
  96. data/tests/bootcamp/dist/core/variables/_helpers.scss +0 -5
  97. data/tests/bootcamp/dist/core/variables/_settings.scss +0 -2
  98. data/tests/bootcamp/dist/core/variables/_should.scss +0 -6
  99. data/tests/bootcamp/dist/core/variables/_trackers.scss +0 -6
  100. data/tests/bootcamp/dist/lib/_sassyjson.scss +0 -1075
  101. data/tests/bootcamp/dist/matchers/_be.scss +0 -3
  102. data/tests/bootcamp/dist/matchers/_equal.scss +0 -3
  103. data/tests/bootcamp/dist/matchers/lists/_be-empty.scss +0 -3
  104. data/tests/bootcamp/dist/matchers/lists/_be-longer-than.scss +0 -3
  105. data/tests/bootcamp/dist/matchers/lists/_be-shorter-than.scss +0 -3
  106. data/tests/bootcamp/dist/matchers/lists/_contain.scss +0 -3
  107. data/tests/bootcamp/dist/matchers/lists/_deep-contain.scss +0 -3
  108. data/tests/bootcamp/dist/matchers/lists/_deep-equal.scss +0 -47
  109. data/tests/bootcamp/dist/matchers/lists/_have-length-of.scss +0 -3
  110. data/tests/bootcamp/dist/matchers/numbers/_be-close-to.scss +0 -12
  111. data/tests/bootcamp/dist/matchers/numbers/_be-greater-than.scss +0 -12
  112. data/tests/bootcamp/dist/matchers/numbers/_be-less-than.scss +0 -12
  113. data/tests/bootcamp/dist/matchers/types/_be-falsy.scss +0 -3
  114. data/tests/bootcamp/dist/matchers/types/_be-null.scss +0 -3
  115. data/tests/bootcamp/dist/matchers/types/_be-truthy.scss +0 -3
  116. data/tests/bootcamp/dist/matchers/types/_have-type-of.scss +0 -3
  117. data/tests/bootcamp/dist/utils/_contain.scss +0 -15
  118. data/tests/bootcamp/dist/utils/_equal.scss +0 -23
  119. data/tests/bootcamp/dist/utils/_list-join.scss +0 -35
  120. data/tests/bootcamp/dist/utils/_power.scss +0 -15
  121. data/tests/bootcamp/package.json +0 -63
  122. data/tests/bootcamp/tasks/bootcamp.coffee +0 -83
  123. data/tests/bootcamp/test/core/functions/_actual.scss +0 -10
  124. data/tests/bootcamp/test/core/functions/_expect.scss +0 -6
  125. data/tests/bootcamp/test/core/functions/_not-to.scss +0 -5
  126. data/tests/bootcamp/test/core/functions/_should.scss +0 -10
  127. data/tests/bootcamp/test/core/functions/_to.scss +0 -5
  128. data/tests/bootcamp/test/core/mixins/_describe.scss +0 -11
  129. data/tests/bootcamp/test/core/mixins/_it.scss +0 -5
  130. data/tests/bootcamp/test/core/mixins/_should.scss +0 -5
  131. data/tests/bootcamp/test/core/mixins/_xdescribe.scss +0 -28
  132. data/tests/bootcamp/test/core/mixins/_xit.scss +0 -12
  133. data/tests/bootcamp/test/matchers/_be.scss +0 -90
  134. data/tests/bootcamp/test/matchers/_equal.scss +0 -33
  135. data/tests/bootcamp/test/matchers/lists/_be-empty.scss +0 -12
  136. data/tests/bootcamp/test/matchers/lists/_be-longer-than.scss +0 -29
  137. data/tests/bootcamp/test/matchers/lists/_be-shorter-than.scss +0 -29
  138. data/tests/bootcamp/test/matchers/lists/_contain.scss +0 -39
  139. data/tests/bootcamp/test/matchers/lists/_deep-contain.scss +0 -51
  140. data/tests/bootcamp/test/matchers/lists/_deep-equal.scss +0 -151
  141. data/tests/bootcamp/test/matchers/lists/_have-length-of.scss +0 -31
  142. data/tests/bootcamp/test/matchers/numbers/_be-close-to.scss +0 -24
  143. data/tests/bootcamp/test/matchers/numbers/_be-greater-than.scss +0 -16
  144. data/tests/bootcamp/test/matchers/numbers/_be-less-than.scss +0 -16
  145. data/tests/bootcamp/test/matchers/types/_be-falsy.scss +0 -14
  146. data/tests/bootcamp/test/matchers/types/_be-null.scss +0 -13
  147. data/tests/bootcamp/test/matchers/types/_be-truthy.scss +0 -13
  148. data/tests/bootcamp/test/matchers/types/_have-type-of.scss +0 -17
  149. data/tests/bootcamp/test/specs.scss +0 -45
  150. data/tests/bootcamp/test/utils/_contain.scss +0 -41
  151. data/tests/bootcamp/test/utils/_equal.scss +0 -79
  152. data/tests/bootcamp/test/utils/_list-join.scss +0 -39
  153. data/tests/bootcamp/test/utils/_power.scss +0 -13
  154. data/tests/sass-prof.log +0 -0
@@ -1,32 +1,32 @@
1
- //
2
- // Convert fixed to fluid width
3
- //
4
- @include describe("[function] fluid-width") {
5
-
6
- @include it("should expect result to be equal to manual calculation") {
7
- @include should(expect(
8
- flint-fluid-width(80em / 16, 80em)),
9
- to(be(100% / 16))
10
- );
11
- @include should(expect(
12
- flint-fluid-width(80em / 8, 80em)),
13
- to(be(100% / 8))
14
- );
15
- @include should(expect(
16
- flint-fluid-width(80em / 4, 80em)),
17
- to(be(100% / 4))
18
- );
19
- @include should(expect(
20
- flint-fluid-width(80em / 3, 80em)),
21
- to(be(100% / 3))
22
- );
23
- @include should(expect(
24
- flint-fluid-width(80em / 2, 80em)),
25
- to(be(100% / 2))
26
- );
27
- @include should(expect(
28
- flint-fluid-width(80em / 1, 80em)),
29
- to(be(100% / 1))
30
- );
31
- }
32
- }
1
+ //
2
+ // Convert fixed to fluid width
3
+ //
4
+ @include describe("[function] fluid-width") {
5
+
6
+ @include it("should expect result to be equal to manual calculation") {
7
+ @include should(expect(
8
+ flint-fluid-width(80em / 16, 80em)),
9
+ to(be(100% / 16))
10
+ );
11
+ @include should(expect(
12
+ flint-fluid-width(80em / 8, 80em)),
13
+ to(be(100% / 8))
14
+ );
15
+ @include should(expect(
16
+ flint-fluid-width(80em / 4, 80em)),
17
+ to(be(100% / 4))
18
+ );
19
+ @include should(expect(
20
+ flint-fluid-width(80em / 3, 80em)),
21
+ to(be(100% / 3))
22
+ );
23
+ @include should(expect(
24
+ flint-fluid-width(80em / 2, 80em)),
25
+ to(be(100% / 2))
26
+ );
27
+ @include should(expect(
28
+ flint-fluid-width(80em / 1, 80em)),
29
+ to(be(100% / 1))
30
+ );
31
+ }
32
+ }
@@ -1,31 +1,31 @@
1
- //
2
- // Gets the index of the passed key
3
- //
4
- @include describe("[function] get-index") {
5
-
6
- @include it("should expect index to match index of key in configuration map") {
7
- @include should(expect(
8
- flint-get-index("desktop")),
9
- to(be(1))
10
- );
11
- @include should(expect(
12
- flint-get-index("laptop")),
13
- to(be(2))
14
- );
15
- @include should(expect(
16
- flint-get-index("tablet")),
17
- to(be(3))
18
- );
19
- @include should(expect(
20
- flint-get-index("mobile")),
21
- to(be(4))
22
- );
23
- }
24
-
25
- @include it("should expect index to not be found") {
26
- @include should(expect(
27
- flint-get-index("unknown")),
28
- to(be(false))
29
- );
30
- }
31
- }
1
+ //
2
+ // Gets the index of the passed key
3
+ //
4
+ @include describe("[function] get-index") {
5
+
6
+ @include it("should expect index to match index of key in configuration map") {
7
+ @include should(expect(
8
+ flint-get-index("desktop")),
9
+ to(be(1))
10
+ );
11
+ @include should(expect(
12
+ flint-get-index("laptop")),
13
+ to(be(2))
14
+ );
15
+ @include should(expect(
16
+ flint-get-index("tablet")),
17
+ to(be(3))
18
+ );
19
+ @include should(expect(
20
+ flint-get-index("mobile")),
21
+ to(be(4))
22
+ );
23
+ }
24
+
25
+ @include it("should expect index to not be found") {
26
+ @include should(expect(
27
+ flint-get-index("unknown")),
28
+ to(be(false))
29
+ );
30
+ }
31
+ }
@@ -1,72 +1,72 @@
1
- //
2
- // Get single value from key in instance map based on $selector::$key
3
- //
4
- @include describe("[function] get-instance-value") {
5
-
6
- // $flint-instances: (
7
- // ".instance::desktop": (
8
- // "instance-count": 1,
9
- // "parent-selector": none,
10
- // "key": "desktop",
11
- // "breakpoint": 80em,
12
- // "columns": 16,
13
- // "span": 4,
14
- // "context": null,
15
- // "gutter": null,
16
- // "internal": (
17
- // "width": 18.75em,
18
- // "margin-right": 0.625em,
19
- // "margin-left": 0.625em
20
- // )
21
- // )
22
- // );
23
-
24
- @include it("should expect to return false unless inside of a parent instance") {
25
- @include should(expect(
26
- flint-get-instance-value("desktop", "breakpoint")),
27
- to(be(false))
28
- );
29
- }
30
-
31
- .parent-instance {
32
- @include _("desktop", 4);
33
-
34
- .child-instance {
35
- @include _("desktop", 2) {
36
-
37
- @include it("should expect correct value from parent selector to be fetched from instance map") {
38
- @include should(expect(
39
- flint-get-instance-value("desktop", "breakpoint")),
40
- to(be(80em))
41
- );
42
- @include should(expect(
43
- flint-get-instance-value("desktop", "columns")),
44
- to(be(16))
45
- );
46
- @include should(expect(
47
- flint-get-instance-value("desktop", "span")),
48
- to(be(4))
49
- );
50
- @include should(expect(
51
- flint-get-instance-value("desktop", "internal", "width")),
52
- to(be(18.75em))
53
- );
54
- }
55
-
56
- @include it("should expect non-existent values to return false") {
57
- @include should(expect(
58
- flint-get-instance-value("mobile", "breakpoint")),
59
- to(be(false))
60
- );
61
- @include should(expect(
62
- flint-get-instance-value("laptop", "columns")),
63
- to(be(false))
64
- );
65
- }
66
- }
67
- }
68
- }
69
-
70
- $flint-instances: () !global;
71
- $flint-instance-count: 0 !global;
72
- }
1
+ //
2
+ // Get single value from key in instance map based on $selector::$key
3
+ //
4
+ @include describe("[function] get-instance-value") {
5
+
6
+ // $flint-instances: (
7
+ // ".instance::desktop": (
8
+ // "instance-count": 1,
9
+ // "parent-selector": none,
10
+ // "key": "desktop",
11
+ // "breakpoint": 80em,
12
+ // "columns": 16,
13
+ // "span": 4,
14
+ // "context": null,
15
+ // "gutter": null,
16
+ // "internal": (
17
+ // "width": 18.75em,
18
+ // "margin-right": 0.625em,
19
+ // "margin-left": 0.625em
20
+ // )
21
+ // )
22
+ // );
23
+
24
+ @include it("should expect to return false unless inside of a parent instance") {
25
+ @include should(expect(
26
+ flint-get-instance-value("desktop", "breakpoint")),
27
+ to(be(false))
28
+ );
29
+ }
30
+
31
+ .parent-instance {
32
+ @include _("desktop", 4);
33
+
34
+ .child-instance {
35
+ @include _("desktop", 2) {
36
+
37
+ @include it("should expect correct value from parent selector to be fetched from instance map") {
38
+ @include should(expect(
39
+ flint-get-instance-value("desktop", "breakpoint")),
40
+ to(be(80em))
41
+ );
42
+ @include should(expect(
43
+ flint-get-instance-value("desktop", "columns")),
44
+ to(be(16))
45
+ );
46
+ @include should(expect(
47
+ flint-get-instance-value("desktop", "span")),
48
+ to(be(4))
49
+ );
50
+ @include should(expect(
51
+ flint-get-instance-value("desktop", "internal", "width")),
52
+ to(be(18.75em))
53
+ );
54
+ }
55
+
56
+ @include it("should expect non-existent values to return false") {
57
+ @include should(expect(
58
+ flint-get-instance-value("mobile", "breakpoint")),
59
+ to(be(false))
60
+ );
61
+ @include should(expect(
62
+ flint-get-instance-value("laptop", "columns")),
63
+ to(be(false))
64
+ );
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ $flint-instances: () !global;
71
+ $flint-instance-count: 0 !global;
72
+ }
@@ -1,28 +1,28 @@
1
- //
2
- // Get single value from configuration map
3
- //
4
- @include describe("[function] get-value") {
5
-
6
- @include it("should expect value to be fetched from configuration map") {
7
- @include should(expect(
8
- flint-get-value("breakpoints", "desktop", "breakpoint")),
9
- to(be(80em))
10
- );
11
- @include should(expect(
12
- flint-get-value("breakpoints", "laptop", "columns")),
13
- to(be(12))
14
- );
15
- @include should(expect(
16
- flint-get-value("settings", "grid")),
17
- to(be("fluid"))
18
- );
19
- @include should(expect(
20
- flint-get-value("settings", "gutter")),
21
- to(be(0.625em))
22
- );
23
- @include should(expect(
24
- flint-get-value("settings", "float-direction")),
25
- to(be("left"))
26
- );
27
- }
28
- }
1
+ //
2
+ // Get single value from configuration map
3
+ //
4
+ @include describe("[function] get-value") {
5
+
6
+ @include it("should expect value to be fetched from configuration map") {
7
+ @include should(expect(
8
+ flint-get-value("breakpoints", "desktop", "breakpoint")),
9
+ to(be(80em))
10
+ );
11
+ @include should(expect(
12
+ flint-get-value("breakpoints", "laptop", "columns")),
13
+ to(be(12))
14
+ );
15
+ @include should(expect(
16
+ flint-get-value("settings", "grid")),
17
+ to(be("fluid"))
18
+ );
19
+ @include should(expect(
20
+ flint-get-value("settings", "gutter")),
21
+ to(be(0.625em))
22
+ );
23
+ @include should(expect(
24
+ flint-get-value("settings", "float-direction")),
25
+ to(be("left"))
26
+ );
27
+ }
28
+ }
@@ -1,35 +1,35 @@
1
- //
2
- // Checks if instance exists in selector familiy tree, falls back from current selector
3
- //
4
- @include describe("[function] has-family-instance") {
5
-
6
- @include it("should expect to return false unless inside of a parent instance") {
7
- @include should(expect(
8
- flint-has-family-instance("desktop")),
9
- to(be(false))
10
- );
11
- }
12
-
13
- .parent-instance {
14
- @include _("laptop", 4);
15
-
16
- .child-instance {
17
- @include _("laptop", 2) {
18
-
19
- @include it("should expect to return true unless instance doesnt exist") {
20
- @include should(expect(
21
- flint-has-family-instance("desktop")),
22
- to(be(false))
23
- );
24
- @include should(expect(
25
- flint-has-family-instance("laptop")),
26
- to(be(".parent-instance::laptop"))
27
- );
28
- }
29
- }
30
- }
31
- }
32
-
33
- $flint-instances: () !global;
34
- $flint-instance-count: 0 !global;
35
- }
1
+ //
2
+ // Checks if instance exists in selector familiy tree, falls back from current selector
3
+ //
4
+ @include describe("[function] has-family-instance") {
5
+
6
+ @include it("should expect to return false unless inside of a parent instance") {
7
+ @include should(expect(
8
+ flint-has-family-instance("desktop")),
9
+ to(be(false))
10
+ );
11
+ }
12
+
13
+ .parent-instance {
14
+ @include _("laptop", 4);
15
+
16
+ .child-instance {
17
+ @include _("laptop", 2) {
18
+
19
+ @include it("should expect to return true unless instance doesnt exist") {
20
+ @include should(expect(
21
+ flint-has-family-instance("desktop")),
22
+ to(be(false))
23
+ );
24
+ @include should(expect(
25
+ flint-has-family-instance("laptop")),
26
+ to(be(".parent-instance::laptop"))
27
+ );
28
+ }
29
+ }
30
+ }
31
+ }
32
+
33
+ $flint-instances: () !global;
34
+ $flint-instance-count: 0 !global;
35
+ }
@@ -1,187 +1,187 @@
1
- //
2
- // Keeps count of all instances with arguments, stores in global var
3
- //
4
- @include describe("[function] instance") {
5
-
6
- $pseudo-instance: (
7
- ".instance::desktop": (
8
- "instance-count": 1,
9
- "parent-selector": none,
10
- "key": "desktop",
11
- "breakpoint": 80em,
12
- "columns": 16,
13
- "span": 4,
14
- "context": null,
15
- "gutter": null,
16
- "internal": (
17
- "width": 18.75em,
18
- "margin-right": 0.625em,
19
- "margin-left": 0.625em
20
- )
21
- )
22
- );
23
-
24
- .instance {
25
- @include _("desktop", 4);
26
-
27
- @at-root {
28
- @include it("should expect instance map to match pseudo instance") {
29
- @include should(expect(inspect($flint-instances)), to(be(inspect($pseudo-instance))));
30
- }
31
- }
32
-
33
- $flint-instances: () !global;
34
- $flint-instance-count: 0 !global;
35
-
36
- $flint-instances: flint-instance("desktop", 4, null, null, 18.75em, 0.625em, 0.625em) !global;
37
-
38
- @at-root {
39
- @include it("should expect instance map to match pseudo instance") {
40
- @include should(expect(inspect($flint-instances)), to(be(inspect($pseudo-instance))));
41
- }
42
- }
43
- }
44
-
45
- $flint-instances: () !global;
46
- $flint-instance-count: 0 !global;
47
-
48
- $pseudo-instance: (
49
- ".parent-instance .child-instance::mobile": (
50
- "instance-count": 8,
51
- "parent-selector": ".parent-instance::mobile",
52
- "key": "mobile",
53
- "breakpoint": 20em,
54
- "columns": 4,
55
- "span": 2,
56
- "context": 4,
57
- "gutter": normal,
58
- "internal": (
59
- "width": 8.125em,
60
- "margin-right": 0.625em,
61
- "margin-left": 0.625em
62
- )
63
- ),
64
- ".parent-instance .child-instance::tablet": (
65
- "instance-count": 7,
66
- "parent-selector": ".parent-instance::tablet",
67
- "key": "tablet",
68
- "breakpoint": 40em,
69
- "columns": 8,
70
- "span": 2,
71
- "context": 4,
72
- "gutter": normal,
73
- "internal": (
74
- "width": 8.4375em,
75
- "margin-right": 0.625em,
76
- "margin-left": 0.625em
77
- )
78
- ),
79
- ".parent-instance .child-instance::laptop": (
80
- "instance-count": 6,
81
- "parent-selector": ".parent-instance::laptop",
82
- "key": "laptop",
83
- "breakpoint": 60em,
84
- "columns": 12,
85
- "span": 2,
86
- "context": 4,
87
- "gutter": inside,
88
- "internal": (
89
- "width": 7.1875em,
90
- "margin-right": 0.625em,
91
- "margin-left": 0.625em
92
- )
93
- ),
94
- ".parent-instance .child-instance::desktop": (
95
- "instance-count": 5,
96
- "parent-selector": ".parent-instance::desktop",
97
- "key": "desktop",
98
- "breakpoint": 80em,
99
- "columns": 16,
100
- "span": 2,
101
- "context": 4,
102
- "gutter": row,
103
- "internal": (
104
- "width": 9.375em,
105
- "margin-right": 0,
106
- "margin-left": 0
107
- )
108
- ),
109
- ".parent-instance::mobile": (
110
- "instance-count": 4,
111
- "parent-selector": none,
112
- "key": "mobile",
113
- "breakpoint": 20em,
114
- "columns": 4,
115
- "span": 4,
116
- "context": null,
117
- "gutter": center,
118
- "internal": (
119
- "width": 18.75em,
120
- "margin-right": auto,
121
- "margin-left": auto
122
- )
123
- ),
124
- ".parent-instance::tablet": (
125
- "instance-count": 3,
126
- "parent-selector": none,
127
- "key": "tablet",
128
- "breakpoint": 40em,
129
- "columns": 8,
130
- "span": 4,
131
- "context": null,
132
- "gutter": omega,
133
- "internal": (
134
- "width": 19.375em,
135
- "margin-right": 0,
136
- "margin-left": 0.625em
137
- )
138
- ),
139
- ".parent-instance::laptop": (
140
- "instance-count": 2,
141
- "parent-selector": none,
142
- "key": "laptop",
143
- "breakpoint": 60em,
144
- "columns": 12,
145
- "span": 4,
146
- "context": null,
147
- "gutter": alpha,
148
- "internal": (
149
- "width": 19.375em,
150
- "margin-right": 0.625em,
151
- "margin-left": 0
152
- )
153
- ),
154
- ".parent-instance::desktop": (
155
- "instance-count": 1,
156
- "parent-selector": none,
157
- "key": "desktop",
158
- "breakpoint": 80em,
159
- "columns": 16,
160
- "span": 4,
161
- "context": null,
162
- "gutter": normal,
163
- "internal": (
164
- "width": 18.75em,
165
- "margin-right": 0.625em,
166
- "margin-left": 0.625em
167
- )
168
- )
169
- );
170
-
171
- .parent-instance {
172
- @include _(4, $gutter: normal alpha omega center);
173
-
174
- .child-instance {
175
- @include _(2, "auto", $gutter: row inside normal normal);
176
-
177
- @at-root {
178
- @include it("should expect instance map to match pseudo instance map") {
179
- @include should(expect(inspect($flint-instances)), to(be(inspect($pseudo-instance))));
180
- }
181
- }
182
- }
183
- }
184
-
185
- $flint-instances: () !global;
186
- $flint-instance-count: 0 !global;
187
- }
1
+ //
2
+ // Keeps count of all instances with arguments, stores in global var
3
+ //
4
+ @include describe("[function] instance") {
5
+
6
+ $pseudo-instance: (
7
+ ".instance::desktop": (
8
+ "instance-count": 1,
9
+ "parent-selector": none,
10
+ "key": "desktop",
11
+ "breakpoint": 80em,
12
+ "columns": 16,
13
+ "span": 4,
14
+ "context": null,
15
+ "gutter": null,
16
+ "internal": (
17
+ "width": 18.75em,
18
+ "margin-right": 0.625em,
19
+ "margin-left": 0.625em
20
+ )
21
+ )
22
+ );
23
+
24
+ .instance {
25
+ @include _("desktop", 4);
26
+
27
+ @at-root {
28
+ @include it("should expect instance map to match pseudo instance") {
29
+ @include should(expect(inspect($flint-instances)), to(be(inspect($pseudo-instance))));
30
+ }
31
+ }
32
+
33
+ $flint-instances: () !global;
34
+ $flint-instance-count: 0 !global;
35
+
36
+ $flint-instances: flint-instance("desktop", 4, null, null, 18.75em, 0.625em, 0.625em) !global;
37
+
38
+ @at-root {
39
+ @include it("should expect instance map to match pseudo instance") {
40
+ @include should(expect(inspect($flint-instances)), to(be(inspect($pseudo-instance))));
41
+ }
42
+ }
43
+ }
44
+
45
+ $flint-instances: () !global;
46
+ $flint-instance-count: 0 !global;
47
+
48
+ $pseudo-instance: (
49
+ ".parent-instance .child-instance::mobile": (
50
+ "instance-count": 8,
51
+ "parent-selector": ".parent-instance::mobile",
52
+ "key": "mobile",
53
+ "breakpoint": 20em,
54
+ "columns": 4,
55
+ "span": 2,
56
+ "context": 4,
57
+ "gutter": normal,
58
+ "internal": (
59
+ "width": 8.125em,
60
+ "margin-right": 0.625em,
61
+ "margin-left": 0.625em
62
+ )
63
+ ),
64
+ ".parent-instance .child-instance::tablet": (
65
+ "instance-count": 7,
66
+ "parent-selector": ".parent-instance::tablet",
67
+ "key": "tablet",
68
+ "breakpoint": 40em,
69
+ "columns": 8,
70
+ "span": 2,
71
+ "context": 4,
72
+ "gutter": normal,
73
+ "internal": (
74
+ "width": 8.4375em,
75
+ "margin-right": 0.625em,
76
+ "margin-left": 0.625em
77
+ )
78
+ ),
79
+ ".parent-instance .child-instance::laptop": (
80
+ "instance-count": 6,
81
+ "parent-selector": ".parent-instance::laptop",
82
+ "key": "laptop",
83
+ "breakpoint": 60em,
84
+ "columns": 12,
85
+ "span": 2,
86
+ "context": 4,
87
+ "gutter": inside,
88
+ "internal": (
89
+ "width": 7.1875em,
90
+ "margin-right": 0.625em,
91
+ "margin-left": 0.625em
92
+ )
93
+ ),
94
+ ".parent-instance .child-instance::desktop": (
95
+ "instance-count": 5,
96
+ "parent-selector": ".parent-instance::desktop",
97
+ "key": "desktop",
98
+ "breakpoint": 80em,
99
+ "columns": 16,
100
+ "span": 2,
101
+ "context": 4,
102
+ "gutter": row,
103
+ "internal": (
104
+ "width": 9.375em,
105
+ "margin-right": 0,
106
+ "margin-left": 0
107
+ )
108
+ ),
109
+ ".parent-instance::mobile": (
110
+ "instance-count": 4,
111
+ "parent-selector": none,
112
+ "key": "mobile",
113
+ "breakpoint": 20em,
114
+ "columns": 4,
115
+ "span": 4,
116
+ "context": null,
117
+ "gutter": center,
118
+ "internal": (
119
+ "width": 18.75em,
120
+ "margin-right": auto,
121
+ "margin-left": auto
122
+ )
123
+ ),
124
+ ".parent-instance::tablet": (
125
+ "instance-count": 3,
126
+ "parent-selector": none,
127
+ "key": "tablet",
128
+ "breakpoint": 40em,
129
+ "columns": 8,
130
+ "span": 4,
131
+ "context": null,
132
+ "gutter": omega,
133
+ "internal": (
134
+ "width": 19.375em,
135
+ "margin-right": 0,
136
+ "margin-left": 0.625em
137
+ )
138
+ ),
139
+ ".parent-instance::laptop": (
140
+ "instance-count": 2,
141
+ "parent-selector": none,
142
+ "key": "laptop",
143
+ "breakpoint": 60em,
144
+ "columns": 12,
145
+ "span": 4,
146
+ "context": null,
147
+ "gutter": alpha,
148
+ "internal": (
149
+ "width": 19.375em,
150
+ "margin-right": 0.625em,
151
+ "margin-left": 0
152
+ )
153
+ ),
154
+ ".parent-instance::desktop": (
155
+ "instance-count": 1,
156
+ "parent-selector": none,
157
+ "key": "desktop",
158
+ "breakpoint": 80em,
159
+ "columns": 16,
160
+ "span": 4,
161
+ "context": null,
162
+ "gutter": normal,
163
+ "internal": (
164
+ "width": 18.75em,
165
+ "margin-right": 0.625em,
166
+ "margin-left": 0.625em
167
+ )
168
+ )
169
+ );
170
+
171
+ .parent-instance {
172
+ @include _(4, $gutter: normal alpha omega center);
173
+
174
+ .child-instance {
175
+ @include _(2, "auto", $gutter: row inside normal normal);
176
+
177
+ @at-root {
178
+ @include it("should expect instance map to match pseudo instance map") {
179
+ @include should(expect(inspect($flint-instances)), to(be(inspect($pseudo-instance))));
180
+ }
181
+ }
182
+ }
183
+ }
184
+
185
+ $flint-instances: () !global;
186
+ $flint-instance-count: 0 !global;
187
+ }