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,28 +1,28 @@
1
- ///
2
- /// Creates a new instance, adds to global instance map
3
- ///
4
- /// @access private
5
- ///
6
- /// @param {String} $calc-key
7
- /// @param {Number} $calc-span
8
- /// @param {Number} $calc-context
9
- /// @param {Number} $calc-gutter
10
- /// @param {Number} $output-width
11
- /// @param {Number} $output-margin-right
12
- /// @param {Number} $output-margin-left
13
- ///
14
- /// @group Internal Mixins
15
- ///
16
- @mixin flint-new-instance($calc-key, $calc-span, $calc-context, $calc-gutter, $output-width, $output-margin-right, $output-margin-left) {
17
- $flint-instances:
18
- flint-instance(
19
- $calc-key,
20
- $calc-span,
21
- $calc-context,
22
- $calc-gutter,
23
- $output-width,
24
- $output-margin-right,
25
- $output-margin-left
26
- )
27
- !global;
28
- }
1
+ ///
2
+ /// Creates a new instance, adds to global instance map
3
+ ///
4
+ /// @access private
5
+ ///
6
+ /// @param {String} $calc-key
7
+ /// @param {Number} $calc-span
8
+ /// @param {Number} $calc-context
9
+ /// @param {Number} $calc-gutter
10
+ /// @param {Number} $output-width
11
+ /// @param {Number} $output-margin-right
12
+ /// @param {Number} $output-margin-left
13
+ ///
14
+ /// @group Internal Mixins
15
+ ///
16
+ @mixin flint-new-instance($calc-key, $calc-span, $calc-context, $calc-gutter, $output-width, $output-margin-right, $output-margin-left) {
17
+ $flint-instances:
18
+ flint-instance(
19
+ $calc-key,
20
+ $calc-span,
21
+ $calc-context,
22
+ $calc-gutter,
23
+ $output-width,
24
+ $output-margin-right,
25
+ $output-margin-left
26
+ )
27
+ !global;
28
+ }
@@ -1,44 +1,44 @@
1
- ////
2
- /// @group Internal Mixins
3
- ////
4
-
5
- ///
6
- /// Prints debug properties
7
- ///
8
- /// @access private
9
- ///
10
- /// @param {String} $calc-key - breakpoint key to search for instance
11
- ///
12
- @mixin flint-debug-instance($calc-key) {
13
- @if flint-get-value("settings", "debug-mode") {
14
- // Lets clean up the selector a bit...
15
- $selector: nth(&, 1);
16
- // Append key to selector
17
- $print-selector: "#{$selector}" + "::" + "#{$calc-key}";
18
- @include flint-print-instance(map-get($flint-instances, unquote($print-selector)));
19
- }
20
- }
21
-
22
- ///
23
- /// Prints all contents of instance map
24
- ///
25
- /// @access private
26
- ///
27
- /// @param {Map} $instance - instance map
28
- ///
29
- @mixin flint-print-instance($instance) {
30
-
31
- // Loop through each property in passed instance
32
- @each $property, $value in $instance {
33
-
34
- // Check if value is output map
35
- @if flint-is-map($value) {
36
- @each $prop, $val in $value {
37
- -flint-output-#{$prop}: #{$val};
38
- }
39
- // Else, print values as flagged comments
40
- } @else {
41
- -flint-#{$property}: #{$value};
42
- }
43
- }
44
- }
1
+ ////
2
+ /// @group Internal Mixins
3
+ ////
4
+
5
+ ///
6
+ /// Prints debug properties
7
+ ///
8
+ /// @access private
9
+ ///
10
+ /// @param {String} $calc-key - breakpoint key to search for instance
11
+ ///
12
+ @mixin flint-debug-instance($calc-key) {
13
+ @if flint-get-value("settings", "debug-mode") {
14
+ // Lets clean up the selector a bit...
15
+ $selector: nth(&, 1);
16
+ // Append key to selector
17
+ $print-selector: "#{$selector}" + "::" + "#{$calc-key}";
18
+ @include flint-print-instance(map-get($flint-instances, unquote($print-selector)));
19
+ }
20
+ }
21
+
22
+ ///
23
+ /// Prints all contents of instance map
24
+ ///
25
+ /// @access private
26
+ ///
27
+ /// @param {Map} $instance - instance map
28
+ ///
29
+ @mixin flint-print-instance($instance) {
30
+
31
+ // Loop through each property in passed instance
32
+ @each $property, $value in $instance {
33
+
34
+ // Check if value is output map
35
+ @if flint-is-map($value) {
36
+ @each $prop, $val in $value {
37
+ -flint-output-#{$prop}: #{$val};
38
+ }
39
+ // Else, print values as flagged comments
40
+ } @else {
41
+ -flint-#{$property}: #{$value};
42
+ }
43
+ }
44
+ }
@@ -1,34 +1,22 @@
1
- require "../lib/flint.rb"
2
- require "rubygems"
3
- require "bundler"
4
-
5
- # Require dependencies through bundler
6
- Bundler.require(:default, :test) if defined?(Bundler)
7
-
8
- require "sass-prof"
9
- prof = SassProf::Config
10
- # prof.output_file = "sass-prof.log"
11
- # prof.quiet = false
12
- prof.max_width = 40
13
- prof.color = true
14
- prof.t_max = 90000
15
- prof.ignore = [:var]
16
-
17
- # Define paths
18
- css_dir = "output"
19
- sass_dir = "input"
20
-
21
- # Output style will change based on environment
22
- output_style = :expanded
23
-
24
- # Disable line comments
25
- line_comments = false
26
-
27
- # Disable Sass warnings
28
- # disable_warnings = true
29
-
30
- # Options
31
- sass_options = {
32
- # For when working on Windows machines
33
- :unix_newlines => true
34
- }
1
+ require "../lib/flint.rb"
2
+ require "rubygems"
3
+ require "bundler"
4
+
5
+ Bundler.require(:default, :test) if defined?(Bundler)
6
+
7
+ # require "sass-prof"
8
+ # prof = SassProf::Config
9
+ # prof.output_file = "sass-prof.log"
10
+ # prof.quiet = false
11
+ # prof.max_width = 40
12
+ # prof.color = true
13
+ # prof.t_max = 90000
14
+ # prof.ignore = [:var]
15
+
16
+ css_dir = "output"
17
+ sass_dir = "input"
18
+ output_style = :expanded
19
+ line_comments = false
20
+ sass_options = {
21
+ :unix_newlines => true
22
+ }
@@ -1,47 +1,47 @@
1
- ///
2
- /// Helpers
3
- ///
4
- @import "helpers/helpers";
5
-
6
- ///
7
- /// Functions
8
- ///
9
-
10
- // Getters
11
- @import "lib/map-fetch";
12
- @import "lib/get-value";
13
- @import "lib/get-index";
14
- @import "lib/steal-key";
15
- @import "lib/steal-values";
16
-
17
- // Calculations
18
- @import "lib/fluid-width";
19
- @import "lib/calc-width";
20
- @import "lib/calc-breakpoint";
21
-
22
- // Instance functions
23
- @import "lib/instance";
24
- @import "lib/has-family-instance";
25
- @import "lib/get-instance-value";
26
-
27
- // List functions
28
- @import "lib/list-to-str";
29
- @import "lib/types-in-list";
30
- @import "lib/next-index";
31
- @import "lib/purge";
32
- @import "lib/replace";
33
- @import "lib/remove";
34
- @import "lib/last";
35
-
36
- // String functions
37
- @import "lib/str-replace";
38
- @import "lib/str-to-list";
39
-
40
- ///
41
- /// Support syntax
42
- ///
43
- @import "lib/use-syntax";
44
- @import "lib/support-syntax";
45
-
46
- // Syntaxes
47
- @import "lib/support-syntax-bem"
1
+ ///
2
+ /// Helpers
3
+ ///
4
+ @import "helpers/helpers";
5
+
6
+ ///
7
+ /// Functions
8
+ ///
9
+
10
+ // Getters
11
+ @import "lib/map-fetch";
12
+ @import "lib/get-value";
13
+ @import "lib/get-index";
14
+ @import "lib/steal-key";
15
+ @import "lib/steal-values";
16
+
17
+ // Calculations
18
+ @import "lib/fluid-width";
19
+ @import "lib/calc-width";
20
+ @import "lib/calc-breakpoint";
21
+
22
+ // Instance functions
23
+ @import "lib/instance";
24
+ @import "lib/has-family-instance";
25
+ @import "lib/get-instance-value";
26
+
27
+ // List functions
28
+ @import "lib/list-to-str";
29
+ @import "lib/types-in-list";
30
+ @import "lib/next-index";
31
+ @import "lib/purge";
32
+ @import "lib/replace";
33
+ @import "lib/remove";
34
+ @import "lib/last";
35
+
36
+ // String functions
37
+ @import "lib/str-replace";
38
+ @import "lib/str-to-list";
39
+
40
+ ///
41
+ /// Support syntax
42
+ ///
43
+ @import "lib/use-syntax";
44
+ @import "lib/support-syntax";
45
+
46
+ // Syntaxes
47
+ @import "lib/support-syntax-bem"
@@ -1,437 +1,437 @@
1
- //
2
- // Returns truthiness of a value
3
- //
4
- @include describe("[function] is-true") {
5
-
6
- @include it("should expect values to be truthy") {
7
- @include should(expect(
8
- flint-is-true(true)),
9
- to(be(true))
10
- );
11
- @include should(expect(
12
- flint-is-true("true")),
13
- to(be(true))
14
- );
15
- }
16
-
17
- @include it("should expect values to return false") {
18
- @include should(expect(
19
- flint-is-true(null)),
20
- to(be(false))
21
- );
22
- @include should(expect(
23
- flint-is-true(false)),
24
- to(be(false))
25
- );
26
- @include should(expect(
27
- flint-is-true(())),
28
- to(be(false))
29
- );
30
- @include should(expect(
31
- flint-is-true("")),
32
- to(be(false))
33
- );
34
- }
35
- }
36
-
37
- //
38
- // Checks if item is map
39
- //
40
- @include describe("[function] is-map") {
41
-
42
- $map: ("key": "value");
43
- $list: ("one", "two", "three");
44
- $string: "string";
45
- $number: 1;
46
- $bool: true;
47
- $null: null;
48
-
49
- @include it("should expect variable to be a map and return true") {
50
- @include should(expect(
51
- flint-is-map($map)),
52
- to(be(true))
53
- );
54
- }
55
-
56
- @include it("should expect variable to be a map and return false") {
57
- @include should(expect(
58
- flint-is-map($list)),
59
- to(be(false))
60
- );
61
- @include should(expect(
62
- flint-is-map($string)),
63
- to(be(false))
64
- );
65
- @include should(expect(
66
- flint-is-map($number)),
67
- to(be(false))
68
- );
69
- @include should(expect(
70
- flint-is-map($bool)),
71
- to(be(false))
72
- );
73
- @include should(expect(
74
- flint-is-map($null)),
75
- to(be(false))
76
- );
77
- }
78
- }
79
-
80
- //
81
- // Checks if item is list
82
- //
83
- @include describe("[function] is-list") {
84
-
85
- $map: ("key": "value");
86
- $list: ("one", "two", "three");
87
- $string: "string";
88
- $number: 1;
89
- $bool: true;
90
- $null: null;
91
-
92
- @include it("should expect variable to be a list and return true") {
93
- @include should(expect(
94
- flint-is-list($list)),
95
- to(be(true))
96
- );
97
- }
98
-
99
- @include it("should expect variable to be a list and return false") {
100
- @include should(expect(
101
- flint-is-list($map)),
102
- to(be(false))
103
- );
104
- @include should(expect(
105
- flint-is-list($string)),
106
- to(be(false))
107
- );
108
- @include should(expect(
109
- flint-is-list($number)),
110
- to(be(false))
111
- );
112
- @include should(expect(
113
- flint-is-list($bool)),
114
- to(be(false))
115
- );
116
- @include should(expect(
117
- flint-is-list($null)),
118
- to(be(false))
119
- );
120
- }
121
- }
122
-
123
- //
124
- // Checks if item is number
125
- //
126
- @include describe("[function] is-number") {
127
-
128
- $map: ("key": "value");
129
- $list: ("one", "two", "three");
130
- $string: "string";
131
- $number: 1;
132
- $bool: true;
133
- $null: null;
134
-
135
- @include it("should expect variable to be a number and return true") {
136
- @include should(expect(
137
- flint-is-number($number)),
138
- to(be(true))
139
- );
140
- }
141
-
142
- @include it("should expect variable to be a number and return false") {
143
- @include should(expect(
144
- flint-is-number($map)),
145
- to(be(false))
146
- );
147
- @include should(expect(
148
- flint-is-number($list)),
149
- to(be(false))
150
- );
151
- @include should(expect(
152
- flint-is-number($string)),
153
- to(be(false))
154
- );
155
- @include should(expect(
156
- flint-is-number($bool)),
157
- to(be(false))
158
- );
159
- @include should(expect(
160
- flint-is-number($null)),
161
- to(be(false))
162
- );
163
- }
164
- }
165
-
166
- //
167
- // Checks if item is string
168
- //
169
- @include describe("[function] is-string") {
170
-
171
- $map: ("key": "value");
172
- $list: ("one", "two", "three");
173
- $string: "string";
174
- $number: 1;
175
- $bool: true;
176
- $null: null;
177
-
178
- @include it("should expect variable to be a string and return true") {
179
- @include should(expect(
180
- flint-is-string($string)),
181
- to(be(true))
182
- );
183
- }
184
-
185
- @include it("should expect variable to be a string and return false") {
186
- @include should(expect(
187
- flint-is-string($map)),
188
- to(be(false))
189
- );
190
- @include should(expect(
191
- flint-is-string($list)),
192
- to(be(false))
193
- );
194
- @include should(expect(
195
- flint-is-string($number)),
196
- to(be(false))
197
- );
198
- @include should(expect(
199
- flint-is-string($bool)),
200
- to(be(false))
201
- );
202
- @include should(expect(
203
- flint-is-string($null)),
204
- to(be(false))
205
- );
206
- }
207
- }
208
-
209
- //
210
- // Checks if item is not string
211
- //
212
- @include describe("[function] is-not-string") {
213
-
214
- $map: ("key": "value");
215
- $list: ("one", "two", "three");
216
- $string: "string";
217
- $number: 1;
218
- $bool: true;
219
- $null: null;
220
-
221
- @include it("should expect variable not to be a string") {
222
- @include should(expect(
223
- flint-is-not-string($string)),
224
- not-to(be(true))
225
- );
226
- @include should(expect(
227
- flint-is-not-string($map)),
228
- to(be(true))
229
- );
230
- @include should(expect(
231
- flint-is-not-string($list)),
232
- to(be(true))
233
- );
234
- @include should(expect(
235
- flint-is-not-string($number)),
236
- to(be(true))
237
- );
238
- @include should(expect(
239
- flint-is-not-string($bool)),
240
- to(be(true))
241
- );
242
- @include should(expect(
243
- flint-is-not-string($null)),
244
- to(be(true))
245
- );
246
- }
247
- }
248
-
249
- //
250
- // Get gutter value from config map
251
- //
252
- @include describe("[function] get-gutter") {
253
-
254
- @include it("should expect gutter value from config") {
255
- @include should(expect(
256
- flint-get-gutter()),
257
- to(be((0.625em)))
258
- );
259
- }
260
- }
261
-
262
- //
263
- // Gets list of each breakpoint's key
264
- //
265
- @include describe("[function] get-all-keys") {
266
-
267
- @include it("should expect a list of all breakpoint keys") {
268
- @include should(expect(
269
- flint-get-all-keys()),
270
- to(be(("desktop", "laptop", "tablet", "mobile")))
271
- );
272
- }
273
- }
274
-
275
- //
276
- // Gets list of all breakpoints
277
- //
278
- @include describe("[function] get-all-breakpoints") {
279
-
280
- @include it("should expect a list of all breakpoint values") {
281
- @include should(expect(
282
- flint-get-all-breakpoints()),
283
- to(be((80em, 60em, 40em, 20em)))
284
- );
285
- }
286
- }
287
-
288
- //
289
- // Checks if passed $key is the highest breakpoint
290
- //
291
- @include describe("[function] is-highest-breakpoint") {
292
-
293
- @include it("should expect to be highest breakpoint") {
294
- @include should(expect(
295
- flint-is-highest-breakpoint("desktop")),
296
- to(be(true))
297
- );
298
- }
299
-
300
- @include it("should expect not to be highest breakpoint") {
301
- @include should(expect(
302
- flint-is-highest-breakpoint("laptop")),
303
- to(be(false))
304
- );
305
- @include should(expect(
306
- flint-is-highest-breakpoint("tablet")),
307
- to(be(false))
308
- );
309
- @include should(expect(
310
- flint-is-highest-breakpoint("mobile")),
311
- to(be(false))
312
- );
313
- }
314
- }
315
-
316
- //
317
- // Checks if passed $key is the lowest breakpoint
318
- //
319
- @include describe("[function] is-lowest-breakpoint") {
320
-
321
- @include it("should expect to be lowest breakpoint") {
322
- @include should(expect(
323
- flint-is-lowest-breakpoint("mobile")),
324
- to(be(true))
325
- );
326
- }
327
-
328
- @include it("should expect not to be lowest breakpoint") {
329
- @include should(expect(
330
- flint-is-lowest-breakpoint("desktop")),
331
- to(be(false))
332
- );
333
- @include should(expect(
334
- flint-is-lowest-breakpoint("laptop")),
335
- to(be(false))
336
- );
337
- @include should(expect(
338
- flint-is-lowest-breakpoint("tablet")),
339
- to(be(false))
340
- );
341
- }
342
- }
343
-
344
- //
345
- // Checks if $key is grid default
346
- //
347
- @include describe("[function] is-default") {
348
-
349
- @include it("should expect to be default breakpoint") {
350
- @include should(expect(
351
- flint-is-default("mobile")),
352
- to(be(true))
353
- );
354
- }
355
-
356
- @include it("should expect not to be default breakpoint") {
357
- @include should(expect(
358
- flint-is-default("desktop")),
359
- to(be(false))
360
- );
361
- @include should(expect(
362
- flint-is-default("laptop")),
363
- to(be(false))
364
- );
365
- @include should(expect(
366
- flint-is-default("tablet")),
367
- to(be(false))
368
- );
369
- }
370
- }
371
-
372
- //
373
- // Gets all breakpoint column values
374
- //
375
- @include describe("[function] get-all-columns") {
376
-
377
- @include it("should expect a list of all breakpoint column values") {
378
- @include should(expect(
379
- flint-get-all-columns()),
380
- to(be((16, 12, 8, 4)))
381
- );
382
- }
383
- }
384
-
385
- //
386
- // Returns the unit used in config
387
- //
388
- @include describe("[function] get-config-unit") {
389
- @include it("should expect configuration unit to be ems") {
390
- @include should(expect(
391
- flint-get-config-unit()),
392
- to(be("em"))
393
- );
394
- }
395
- }
396
-
397
- //
398
- // Convert pixel value to em
399
- //
400
- @include describe("[function] to-em") {
401
-
402
- @include it("should expect passed pixel value to be converted to ems") {
403
- @include should(expect(
404
- flint-to-em(16px)),
405
- to(be(1em))
406
- );
407
- @include should(expect(
408
- flint-to-em(32px)),
409
- to(be(2em))
410
- );
411
- @include should(expect(
412
- flint-to-em(16px, 32px)),
413
- to(be(0.5em))
414
- );
415
- }
416
- }
417
-
418
- //
419
- // Convert pixel value to rem
420
- //
421
- @include describe("[function] to-rem") {
422
-
423
- @include it("should expect passed pixel value to be converted to rems") {
424
- @include should(expect(
425
- flint-to-rem(16px)),
426
- to(be(1rem))
427
- );
428
- @include should(expect(
429
- flint-to-rem(32px)),
430
- to(be(2rem))
431
- );
432
- @include should(expect(
433
- flint-to-rem(16px, 32px)),
434
- to(be(0.5rem))
435
- );
436
- }
437
- }
1
+ //
2
+ // Returns truthiness of a value
3
+ //
4
+ @include describe("[function] is-true") {
5
+
6
+ @include it("should expect values to be truthy") {
7
+ @include should(expect(
8
+ flint-is-true(true)),
9
+ to(be(true))
10
+ );
11
+ @include should(expect(
12
+ flint-is-true("true")),
13
+ to(be(true))
14
+ );
15
+ }
16
+
17
+ @include it("should expect values to return false") {
18
+ @include should(expect(
19
+ flint-is-true(null)),
20
+ to(be(false))
21
+ );
22
+ @include should(expect(
23
+ flint-is-true(false)),
24
+ to(be(false))
25
+ );
26
+ @include should(expect(
27
+ flint-is-true(())),
28
+ to(be(false))
29
+ );
30
+ @include should(expect(
31
+ flint-is-true("")),
32
+ to(be(false))
33
+ );
34
+ }
35
+ }
36
+
37
+ //
38
+ // Checks if item is map
39
+ //
40
+ @include describe("[function] is-map") {
41
+
42
+ $map: ("key": "value");
43
+ $list: ("one", "two", "three");
44
+ $string: "string";
45
+ $number: 1;
46
+ $bool: true;
47
+ $null: null;
48
+
49
+ @include it("should expect variable to be a map and return true") {
50
+ @include should(expect(
51
+ flint-is-map($map)),
52
+ to(be(true))
53
+ );
54
+ }
55
+
56
+ @include it("should expect variable to be a map and return false") {
57
+ @include should(expect(
58
+ flint-is-map($list)),
59
+ to(be(false))
60
+ );
61
+ @include should(expect(
62
+ flint-is-map($string)),
63
+ to(be(false))
64
+ );
65
+ @include should(expect(
66
+ flint-is-map($number)),
67
+ to(be(false))
68
+ );
69
+ @include should(expect(
70
+ flint-is-map($bool)),
71
+ to(be(false))
72
+ );
73
+ @include should(expect(
74
+ flint-is-map($null)),
75
+ to(be(false))
76
+ );
77
+ }
78
+ }
79
+
80
+ //
81
+ // Checks if item is list
82
+ //
83
+ @include describe("[function] is-list") {
84
+
85
+ $map: ("key": "value");
86
+ $list: ("one", "two", "three");
87
+ $string: "string";
88
+ $number: 1;
89
+ $bool: true;
90
+ $null: null;
91
+
92
+ @include it("should expect variable to be a list and return true") {
93
+ @include should(expect(
94
+ flint-is-list($list)),
95
+ to(be(true))
96
+ );
97
+ }
98
+
99
+ @include it("should expect variable to be a list and return false") {
100
+ @include should(expect(
101
+ flint-is-list($map)),
102
+ to(be(false))
103
+ );
104
+ @include should(expect(
105
+ flint-is-list($string)),
106
+ to(be(false))
107
+ );
108
+ @include should(expect(
109
+ flint-is-list($number)),
110
+ to(be(false))
111
+ );
112
+ @include should(expect(
113
+ flint-is-list($bool)),
114
+ to(be(false))
115
+ );
116
+ @include should(expect(
117
+ flint-is-list($null)),
118
+ to(be(false))
119
+ );
120
+ }
121
+ }
122
+
123
+ //
124
+ // Checks if item is number
125
+ //
126
+ @include describe("[function] is-number") {
127
+
128
+ $map: ("key": "value");
129
+ $list: ("one", "two", "three");
130
+ $string: "string";
131
+ $number: 1;
132
+ $bool: true;
133
+ $null: null;
134
+
135
+ @include it("should expect variable to be a number and return true") {
136
+ @include should(expect(
137
+ flint-is-number($number)),
138
+ to(be(true))
139
+ );
140
+ }
141
+
142
+ @include it("should expect variable to be a number and return false") {
143
+ @include should(expect(
144
+ flint-is-number($map)),
145
+ to(be(false))
146
+ );
147
+ @include should(expect(
148
+ flint-is-number($list)),
149
+ to(be(false))
150
+ );
151
+ @include should(expect(
152
+ flint-is-number($string)),
153
+ to(be(false))
154
+ );
155
+ @include should(expect(
156
+ flint-is-number($bool)),
157
+ to(be(false))
158
+ );
159
+ @include should(expect(
160
+ flint-is-number($null)),
161
+ to(be(false))
162
+ );
163
+ }
164
+ }
165
+
166
+ //
167
+ // Checks if item is string
168
+ //
169
+ @include describe("[function] is-string") {
170
+
171
+ $map: ("key": "value");
172
+ $list: ("one", "two", "three");
173
+ $string: "string";
174
+ $number: 1;
175
+ $bool: true;
176
+ $null: null;
177
+
178
+ @include it("should expect variable to be a string and return true") {
179
+ @include should(expect(
180
+ flint-is-string($string)),
181
+ to(be(true))
182
+ );
183
+ }
184
+
185
+ @include it("should expect variable to be a string and return false") {
186
+ @include should(expect(
187
+ flint-is-string($map)),
188
+ to(be(false))
189
+ );
190
+ @include should(expect(
191
+ flint-is-string($list)),
192
+ to(be(false))
193
+ );
194
+ @include should(expect(
195
+ flint-is-string($number)),
196
+ to(be(false))
197
+ );
198
+ @include should(expect(
199
+ flint-is-string($bool)),
200
+ to(be(false))
201
+ );
202
+ @include should(expect(
203
+ flint-is-string($null)),
204
+ to(be(false))
205
+ );
206
+ }
207
+ }
208
+
209
+ //
210
+ // Checks if item is not string
211
+ //
212
+ @include describe("[function] is-not-string") {
213
+
214
+ $map: ("key": "value");
215
+ $list: ("one", "two", "three");
216
+ $string: "string";
217
+ $number: 1;
218
+ $bool: true;
219
+ $null: null;
220
+
221
+ @include it("should expect variable not to be a string") {
222
+ @include should(expect(
223
+ flint-is-not-string($string)),
224
+ not-to(be(true))
225
+ );
226
+ @include should(expect(
227
+ flint-is-not-string($map)),
228
+ to(be(true))
229
+ );
230
+ @include should(expect(
231
+ flint-is-not-string($list)),
232
+ to(be(true))
233
+ );
234
+ @include should(expect(
235
+ flint-is-not-string($number)),
236
+ to(be(true))
237
+ );
238
+ @include should(expect(
239
+ flint-is-not-string($bool)),
240
+ to(be(true))
241
+ );
242
+ @include should(expect(
243
+ flint-is-not-string($null)),
244
+ to(be(true))
245
+ );
246
+ }
247
+ }
248
+
249
+ //
250
+ // Get gutter value from config map
251
+ //
252
+ @include describe("[function] get-gutter") {
253
+
254
+ @include it("should expect gutter value from config") {
255
+ @include should(expect(
256
+ flint-get-gutter()),
257
+ to(be((0.625em)))
258
+ );
259
+ }
260
+ }
261
+
262
+ //
263
+ // Gets list of each breakpoint's key
264
+ //
265
+ @include describe("[function] get-all-keys") {
266
+
267
+ @include it("should expect a list of all breakpoint keys") {
268
+ @include should(expect(
269
+ flint-get-all-keys()),
270
+ to(be(("desktop", "laptop", "tablet", "mobile")))
271
+ );
272
+ }
273
+ }
274
+
275
+ //
276
+ // Gets list of all breakpoints
277
+ //
278
+ @include describe("[function] get-all-breakpoints") {
279
+
280
+ @include it("should expect a list of all breakpoint values") {
281
+ @include should(expect(
282
+ flint-get-all-breakpoints()),
283
+ to(be((80em, 60em, 40em, 20em)))
284
+ );
285
+ }
286
+ }
287
+
288
+ //
289
+ // Checks if passed $key is the highest breakpoint
290
+ //
291
+ @include describe("[function] is-highest-breakpoint") {
292
+
293
+ @include it("should expect to be highest breakpoint") {
294
+ @include should(expect(
295
+ flint-is-highest-breakpoint("desktop")),
296
+ to(be(true))
297
+ );
298
+ }
299
+
300
+ @include it("should expect not to be highest breakpoint") {
301
+ @include should(expect(
302
+ flint-is-highest-breakpoint("laptop")),
303
+ to(be(false))
304
+ );
305
+ @include should(expect(
306
+ flint-is-highest-breakpoint("tablet")),
307
+ to(be(false))
308
+ );
309
+ @include should(expect(
310
+ flint-is-highest-breakpoint("mobile")),
311
+ to(be(false))
312
+ );
313
+ }
314
+ }
315
+
316
+ //
317
+ // Checks if passed $key is the lowest breakpoint
318
+ //
319
+ @include describe("[function] is-lowest-breakpoint") {
320
+
321
+ @include it("should expect to be lowest breakpoint") {
322
+ @include should(expect(
323
+ flint-is-lowest-breakpoint("mobile")),
324
+ to(be(true))
325
+ );
326
+ }
327
+
328
+ @include it("should expect not to be lowest breakpoint") {
329
+ @include should(expect(
330
+ flint-is-lowest-breakpoint("desktop")),
331
+ to(be(false))
332
+ );
333
+ @include should(expect(
334
+ flint-is-lowest-breakpoint("laptop")),
335
+ to(be(false))
336
+ );
337
+ @include should(expect(
338
+ flint-is-lowest-breakpoint("tablet")),
339
+ to(be(false))
340
+ );
341
+ }
342
+ }
343
+
344
+ //
345
+ // Checks if $key is grid default
346
+ //
347
+ @include describe("[function] is-default") {
348
+
349
+ @include it("should expect to be default breakpoint") {
350
+ @include should(expect(
351
+ flint-is-default("mobile")),
352
+ to(be(true))
353
+ );
354
+ }
355
+
356
+ @include it("should expect not to be default breakpoint") {
357
+ @include should(expect(
358
+ flint-is-default("desktop")),
359
+ to(be(false))
360
+ );
361
+ @include should(expect(
362
+ flint-is-default("laptop")),
363
+ to(be(false))
364
+ );
365
+ @include should(expect(
366
+ flint-is-default("tablet")),
367
+ to(be(false))
368
+ );
369
+ }
370
+ }
371
+
372
+ //
373
+ // Gets all breakpoint column values
374
+ //
375
+ @include describe("[function] get-all-columns") {
376
+
377
+ @include it("should expect a list of all breakpoint column values") {
378
+ @include should(expect(
379
+ flint-get-all-columns()),
380
+ to(be((16, 12, 8, 4)))
381
+ );
382
+ }
383
+ }
384
+
385
+ //
386
+ // Returns the unit used in config
387
+ //
388
+ @include describe("[function] get-config-unit") {
389
+ @include it("should expect configuration unit to be ems") {
390
+ @include should(expect(
391
+ flint-get-config-unit()),
392
+ to(be("em"))
393
+ );
394
+ }
395
+ }
396
+
397
+ //
398
+ // Convert pixel value to em
399
+ //
400
+ @include describe("[function] to-em") {
401
+
402
+ @include it("should expect passed pixel value to be converted to ems") {
403
+ @include should(expect(
404
+ flint-to-em(16px)),
405
+ to(be(1em))
406
+ );
407
+ @include should(expect(
408
+ flint-to-em(32px)),
409
+ to(be(2em))
410
+ );
411
+ @include should(expect(
412
+ flint-to-em(16px, 32px)),
413
+ to(be(0.5em))
414
+ );
415
+ }
416
+ }
417
+
418
+ //
419
+ // Convert pixel value to rem
420
+ //
421
+ @include describe("[function] to-rem") {
422
+
423
+ @include it("should expect passed pixel value to be converted to rems") {
424
+ @include should(expect(
425
+ flint-to-rem(16px)),
426
+ to(be(1rem))
427
+ );
428
+ @include should(expect(
429
+ flint-to-rem(32px)),
430
+ to(be(2rem))
431
+ );
432
+ @include should(expect(
433
+ flint-to-rem(16px, 32px)),
434
+ to(be(0.5rem))
435
+ );
436
+ }
437
+ }