flint-gs 2.0.6 → 2.0.8

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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -11
  3. data/lib/flint/version.rb +1 -1
  4. data/stylesheets/_flint.scss +3 -3
  5. data/stylesheets/flint/config/_config.scss +24 -24
  6. data/stylesheets/flint/functions/_functions.scss +9 -9
  7. data/stylesheets/flint/functions/helpers/_helpers.scss +138 -138
  8. data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +13 -13
  9. data/stylesheets/flint/functions/lib/_calc-width.scss +17 -17
  10. data/stylesheets/flint/functions/lib/_exists.scss +12 -12
  11. data/stylesheets/flint/functions/lib/_fluid-width.scss +12 -12
  12. data/stylesheets/flint/functions/lib/_get-index.scss +11 -11
  13. data/stylesheets/flint/functions/lib/_get-instance-value.scss +12 -12
  14. data/stylesheets/flint/functions/lib/_get-value.scss +11 -11
  15. data/stylesheets/flint/functions/lib/_has-family-instance.scss +12 -12
  16. data/stylesheets/flint/functions/lib/_instance.scss +17 -17
  17. data/stylesheets/flint/functions/lib/_last.scss +11 -11
  18. data/stylesheets/flint/functions/lib/_list-to-string.scss +15 -15
  19. data/stylesheets/flint/functions/lib/_map-fetch.scss +12 -12
  20. data/stylesheets/flint/functions/lib/_next-index.scss +11 -11
  21. data/stylesheets/flint/functions/lib/_purge.scss +13 -13
  22. data/stylesheets/flint/functions/lib/_remove.scss +15 -15
  23. data/stylesheets/flint/functions/lib/_replace-substring.scss +13 -13
  24. data/stylesheets/flint/functions/lib/_replace.scss +15 -15
  25. data/stylesheets/flint/functions/lib/_steal-key.scss +11 -11
  26. data/stylesheets/flint/functions/lib/_steal-values.scss +12 -12
  27. data/stylesheets/flint/functions/lib/_string-to-list.scss +13 -13
  28. data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +11 -11
  29. data/stylesheets/flint/functions/lib/_support-syntax.scss +12 -12
  30. data/stylesheets/flint/functions/lib/_types-in-list.scss +13 -13
  31. data/stylesheets/flint/functions/lib/_use-syntax.scss +11 -11
  32. data/stylesheets/flint/globals/_globals.scss +80 -80
  33. data/stylesheets/flint/mixins/_mixins.scss +3 -3
  34. data/stylesheets/flint/mixins/lib/_box-sizing.scss +11 -11
  35. data/stylesheets/flint/mixins/lib/_calculate.scss +45 -45
  36. data/stylesheets/flint/mixins/lib/_clearfix.scss +11 -11
  37. data/stylesheets/flint/mixins/lib/_container.scss +10 -10
  38. data/stylesheets/flint/mixins/lib/_main.scss +511 -511
  39. data/stylesheets/flint/mixins/lib/_new-instance.scss +15 -15
  40. data/stylesheets/flint/mixins/lib/_print-instance.scss +17 -17
  41. data/tests/bootcamp/_bootcamp.scss +0 -0
  42. data/tests/bootcamp/bootcamp.coffee +101 -0
  43. data/tests/bootcamp/core/functions/_actual.scss +0 -0
  44. data/tests/bootcamp/core/functions/_error.scss +0 -0
  45. data/tests/bootcamp/core/functions/_expect.scss +0 -0
  46. data/tests/bootcamp/core/functions/_not-to.scss +0 -0
  47. data/tests/bootcamp/core/functions/_should.scss +0 -0
  48. data/tests/bootcamp/core/functions/_to.scss +0 -0
  49. data/tests/bootcamp/core/mixins/_describe.scss +0 -0
  50. data/tests/bootcamp/core/mixins/_it.scss +0 -0
  51. data/tests/bootcamp/core/mixins/_runner.scss +0 -0
  52. data/tests/bootcamp/core/mixins/_should.scss +0 -0
  53. data/tests/bootcamp/core/mixins/_xdescribe.scss +0 -0
  54. data/tests/bootcamp/core/mixins/_xit.scss +0 -0
  55. data/tests/bootcamp/core/variables/_helpers.scss +0 -0
  56. data/tests/bootcamp/core/variables/_settings.scss +0 -0
  57. data/tests/bootcamp/core/variables/_should.scss +0 -0
  58. data/tests/bootcamp/core/variables/_trackers.scss +0 -0
  59. data/tests/bootcamp/lib/_sassyjson.scss +0 -0
  60. data/tests/bootcamp/matchers/_be.scss +0 -0
  61. data/tests/bootcamp/matchers/_equal.scss +0 -0
  62. data/tests/bootcamp/matchers/lists/_be-empty.scss +0 -0
  63. data/tests/bootcamp/matchers/lists/_be-longer-than.scss +0 -0
  64. data/tests/bootcamp/matchers/lists/_be-shorter-than.scss +0 -0
  65. data/tests/bootcamp/matchers/lists/_contain.scss +0 -0
  66. data/tests/bootcamp/matchers/lists/_deep-contain.scss +0 -0
  67. data/tests/bootcamp/matchers/lists/_deep-equal.scss +0 -0
  68. data/tests/bootcamp/matchers/lists/_have-length-of.scss +0 -0
  69. data/tests/bootcamp/matchers/numbers/_be-close-to.scss +0 -0
  70. data/tests/bootcamp/matchers/numbers/_be-greater-than.scss +0 -0
  71. data/tests/bootcamp/matchers/numbers/_be-less-than.scss +0 -0
  72. data/tests/bootcamp/matchers/types/_be-falsy.scss +0 -0
  73. data/tests/bootcamp/matchers/types/_be-null.scss +0 -0
  74. data/tests/bootcamp/matchers/types/_be-truthy.scss +0 -0
  75. data/tests/bootcamp/matchers/types/_have-type-of.scss +0 -0
  76. data/tests/bootcamp/utils/_contain.scss +0 -0
  77. data/tests/bootcamp/utils/_equal.scss +0 -0
  78. data/tests/bootcamp/utils/_list-join.scss +0 -0
  79. data/tests/bootcamp/utils/_power.scss +0 -0
  80. data/tests/input/functions/_functions.scss +9 -9
  81. data/tests/input/functions/helpers/_helpers.scss +45 -45
  82. data/tests/input/functions/lib/_calc-breakpoint.scss +3 -3
  83. data/tests/input/functions/lib/_calc-width.scss +3 -3
  84. data/tests/input/functions/lib/_exists.scss +3 -3
  85. data/tests/input/functions/lib/_fluid-width.scss +3 -3
  86. data/tests/input/functions/lib/_get-index.scss +3 -3
  87. data/tests/input/functions/lib/_get-instance-value.scss +3 -3
  88. data/tests/input/functions/lib/_get-value.scss +3 -3
  89. data/tests/input/functions/lib/_has-family-instance.scss +3 -3
  90. data/tests/input/functions/lib/_instance.scss +3 -3
  91. data/tests/input/functions/lib/_last.scss +3 -3
  92. data/tests/input/functions/lib/_list-to-string.scss +3 -3
  93. data/tests/input/functions/lib/_map-fetch.scss +3 -3
  94. data/tests/input/functions/lib/_next-index.scss +3 -3
  95. data/tests/input/functions/lib/_purge.scss +3 -3
  96. data/tests/input/functions/lib/_remove.scss +3 -3
  97. data/tests/input/functions/lib/_replace-substring.scss +3 -3
  98. data/tests/input/functions/lib/_replace.scss +3 -3
  99. data/tests/input/functions/lib/_steal-key.scss +3 -3
  100. data/tests/input/functions/lib/_steal-values.scss +3 -3
  101. data/tests/input/functions/lib/_string-to-list.scss +3 -3
  102. data/tests/input/functions/lib/_support-syntax-bem.scss +3 -3
  103. data/tests/input/functions/lib/_support-syntax.scss +3 -3
  104. data/tests/input/functions/lib/_types-in-list.scss +3 -3
  105. data/tests/input/functions/lib/_use-syntax.scss +3 -3
  106. data/tests/input/output.scss +22 -22
  107. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ec4363f44d3c5474f6d3fdc697bf91195bc96b1
4
- data.tar.gz: a0c558f75bcd47c2bfde2ba6e925165bd9bb5c33
3
+ metadata.gz: dad60492a22ed4c6e68d63a1259ac3f202d051db
4
+ data.tar.gz: ea0753745e39f131ca86ea433cc04b0ed698e752
5
5
  SHA512:
6
- metadata.gz: 49804977514417dcbb95397f3120c6ede20b077a95b1da7490182098754fcb05c1577ad79cdb84291e06ddf17595650bf036451cd28d6be976051d153a9a1e99
7
- data.tar.gz: b555be8276ad1d2dd136143a2e273a619b9e14f3ed4cf3e282573ceaedd6cd9d31ff95b125a299040fd3b40c6289b8a8fbe8424d83e2c95217e9392182cd866f
6
+ metadata.gz: 8673ea60dcf096602b1ead2c718ad6c042c2430867c6ed42620f844919f31ec10422f48421daaf46dd5a27b051775bb18d15e28840b3833abd04bf1d7eb54575
7
+ data.tar.gz: f2ad842af93ad65c1ab72c0b706a3d7461b1d7eefc9386253a8dd424ed1ea8f7ceef8480657ce2c0b07e94987830879f8efc237695fa3092ab3ea3232307d7b2
data/README.md CHANGED
@@ -43,6 +43,8 @@ scss --require ./lib/flint.rb example.scss > example.css
43
43
 
44
44
  Documentation is located [here](http://flint.gs/docs).
45
45
 
46
+ _Tip: For simple projects, disable `instance-maps`, as it is has a large overhead and will increase your compile times._
47
+
46
48
  ## Syntax support
47
49
 
48
50
  As of `1.6.0`, you can add syntax support for your preferred syntax. I built the system for BEM, but it should be easily extendable to
@@ -50,17 +52,17 @@ support your preferred syntax. Simply create a function which parses a string of
50
52
  function parses the selector string (for example, `.block__element__element`) like so,
51
53
 
52
54
  ```scss
53
- /**
54
- * Parser to support BEM syntax
55
- *
56
- * @access private
57
- *
58
- * @param {List} $selectors - string of selectors to parse
59
- *
60
- * @return {List} - parsed list of selectors according to syntax
61
- *
62
- * @group Internal Functions
63
- */
55
+ ///
56
+ /// Parser to support BEM syntax
57
+ ///
58
+ /// @access private
59
+ ///
60
+ /// @param {List} $selectors - string of selectors to parse
61
+ ///
62
+ /// @return {List} - parsed list of selectors according to syntax
63
+ ///
64
+ /// @group Internal Functions
65
+ ///
64
66
  @function flint-support-syntax-bem($selectors) {
65
67
  // Clean up selector, remove double underscores for spaces
66
68
  // add pseudo character to differentiate selectors
data/lib/flint/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Flint
2
- VERSION = "2.0.6"
2
+ VERSION = "2.0.8"
3
3
  end
@@ -1,6 +1,6 @@
1
- /*
2
- * Flint
3
- */
1
+ //
2
+ // Flint
3
+ //
4
4
  @import "flint/config/config";
5
5
  @import "flint/functions/functions";
6
6
  @import "flint/globals/globals";
@@ -1,27 +1,27 @@
1
- /**
2
- * Configuration map
3
- *
4
- * @type Map
5
- *
6
- * @prop {Map} breakpoints - map of breakpoints, follow DSC order
7
- * @prop {Map} breakpoints.alias - named map of breakpoint settings
8
- * @prop {Number} breakpoints.alias.columns - column count for breakpoint
9
- * @prop {Number} breakpoints.alias.breakpoint - breakpoint value for breakpoint
10
- *
11
- * @prop {Map} settings - map of settings for grid
12
- * @prop {String} settings.default - alias of breakpoint to be grid default
13
- * @prop {String} settings.grid - type of grid
14
- * @prop {Number} settings.gutter - value for gutter
15
- * @prop {String} settings.float-direction - direction of float
16
- * @prop {Bool} settings.max-width - maximum width value
17
- * @prop {Bool} settings.center-container - center containers
18
- * @prop {Bool} settings.border-box-sizing - use `box-sizing: border-box`
19
- * @prop {Bool} settings.instance-maps - use instance maps for added features
20
- * @prop {Bool} settings.support-syntax - support syntax within instance functions
21
- * @prop {Bool} settings.debug-mode - enable debug mode
22
- *
23
- * @group Configuration
24
- */
1
+ ///
2
+ /// Configuration map
3
+ ///
4
+ /// @type Map
5
+ ///
6
+ /// @prop {Map} breakpoints - map of breakpoints, follow DSC order
7
+ /// @prop {Map} breakpoints.alias - named map of breakpoint settings
8
+ /// @prop {Number} breakpoints.alias.columns - column count for breakpoint
9
+ /// @prop {Number} breakpoints.alias.breakpoint - breakpoint value for breakpoint
10
+ ///
11
+ /// @prop {Map} settings - map of settings for grid
12
+ /// @prop {String} settings.default - alias of breakpoint to be grid default
13
+ /// @prop {String} settings.grid - type of grid
14
+ /// @prop {Number} settings.gutter - value for gutter
15
+ /// @prop {String} settings.float-direction - direction of float
16
+ /// @prop {Bool} settings.max-width - maximum width value
17
+ /// @prop {Bool} settings.center-container - center containers
18
+ /// @prop {Bool} settings.border-box-sizing - use `box-sizing: border-box`
19
+ /// @prop {Bool} settings.instance-maps - use instance maps for added features
20
+ /// @prop {Bool} settings.support-syntax - support syntax within instance functions
21
+ /// @prop {Bool} settings.debug-mode - enable debug mode
22
+ ///
23
+ /// @group Configuration
24
+ ///
25
25
  $flint: (
26
26
  "breakpoints": (
27
27
  "desktop": (
@@ -1,11 +1,11 @@
1
- /*
2
- * Helpers
3
- */
1
+ //
2
+ // Helpers
3
+ //
4
4
  @import "helpers/helpers";
5
5
 
6
- /*
7
- * Functions
8
- */
6
+ //
7
+ // Functions
8
+ //
9
9
  @import "lib/exists";
10
10
 
11
11
  // Getters
@@ -38,9 +38,9 @@
38
38
  @import "lib/replace-substring";
39
39
  @import "lib/string-to-list";
40
40
 
41
- /*
42
- * Support syntax
43
- */
41
+ //
42
+ // Support syntax
43
+ //
44
44
  @import "lib/use-syntax";
45
45
  @import "lib/support-syntax";
46
46
 
@@ -1,114 +1,114 @@
1
- /**
2
- * @group Internal Helper Functions
3
- **/
4
-
5
- /**
6
- * Returns truthiness of a value
7
- *
8
- * @access private
9
- *
10
- * @param {*} $value
11
- *
12
- * @return {Bool}
13
- */
1
+ ////
2
+ /// @group Internal Helper Functions
3
+ ////
4
+
5
+ ///
6
+ /// Returns truthiness of a value
7
+ ///
8
+ /// @access private
9
+ ///
10
+ /// @param {*} $value
11
+ ///
12
+ /// @return {Bool}
13
+ ///
14
14
  @function flint-is-true($value) {
15
15
  @return if($value == null, false, $value and $value != null and $value != "" and $value != ());
16
16
  }
17
17
 
18
- /**
19
- * Checks if item is map
20
- *
21
- * @access private
22
- *
23
- * @param {Map} $n
24
- *
25
- * @return {Bool}
26
- */
18
+ ///
19
+ /// Checks if item is map
20
+ ///
21
+ /// @access private
22
+ ///
23
+ /// @param {Map} $n
24
+ ///
25
+ /// @return {Bool}
26
+ ///
27
27
  @function flint-is-map($n) {
28
28
  @return type-of($n) == "map";
29
29
  }
30
30
 
31
- /**
32
- * Checks if item is list
33
- *
34
- * @access private
35
- *
36
- * @param {List} $n
37
- *
38
- * @return {Bool}
39
- */
31
+ ///
32
+ /// Checks if item is list
33
+ ///
34
+ /// @access private
35
+ ///
36
+ /// @param {List} $n
37
+ ///
38
+ /// @return {Bool}
39
+ ///
40
40
  @function flint-is-list($n) {
41
41
  @return type-of($n) == "list";
42
42
  }
43
43
 
44
- /**
45
- * Checks if item is number
46
- *
47
- * @access private
48
- *
49
- * @param {Number} $n
50
- *
51
- * @return {Bool}
52
- */
44
+ ///
45
+ /// Checks if item is number
46
+ ///
47
+ /// @access private
48
+ ///
49
+ /// @param {Number} $n
50
+ ///
51
+ /// @return {Bool}
52
+ ///
53
53
  @function flint-is-number($n) {
54
54
  @return type-of($n) == "number";
55
55
  }
56
56
 
57
- /**
58
- * Checks if item is string
59
- *
60
- * @access private
61
- *
62
- * @param {String} $n
63
- *
64
- * @return {Bool}
65
- */
57
+ ///
58
+ /// Checks if item is string
59
+ ///
60
+ /// @access private
61
+ ///
62
+ /// @param {String} $n
63
+ ///
64
+ /// @return {Bool}
65
+ ///
66
66
  @function flint-is-string($n) {
67
67
  @return type-of($n) == "string";
68
68
  }
69
69
 
70
- /**
71
- * Checks if item is not string
72
- *
73
- * @access private
74
- *
75
- * @param {String} $n
76
- *
77
- * @return {Bool}
78
- */
70
+ ///
71
+ /// Checks if item is not string
72
+ ///
73
+ /// @access private
74
+ ///
75
+ /// @param {String} $n
76
+ ///
77
+ /// @return {Bool}
78
+ ///
79
79
  @function flint-is-not-string($n) {
80
80
  @return type-of($n) != "string";
81
81
  }
82
82
 
83
- /**
84
- * Get gutter value from config map
85
- *
86
- * @access private
87
- *
88
- * @return {Number}
89
- */
83
+ ///
84
+ /// Get gutter value from config map
85
+ ///
86
+ /// @access private
87
+ ///
88
+ /// @return {Number}
89
+ ///
90
90
  @function flint-get-gutter() {
91
91
  @return flint-get-value("settings", "gutter");
92
92
  }
93
93
 
94
- /**
95
- * Gets list of each breakpoint's key
96
- *
97
- * @access private
98
- *
99
- * @return {List}
100
- */
94
+ ///
95
+ /// Gets list of each breakpoint's key
96
+ ///
97
+ /// @access private
98
+ ///
99
+ /// @return {List}
100
+ ///
101
101
  @function flint-get-all-keys() {
102
102
  @return map-keys(flint-get-value("breakpoints"));
103
103
  }
104
104
 
105
- /**
106
- * Gets list of all breakpoints
107
- *
108
- * @access private
109
- *
110
- * @return {List}
111
- */
105
+ ///
106
+ /// Gets list of all breakpoints
107
+ ///
108
+ /// @access private
109
+ ///
110
+ /// @return {List}
111
+ ///
112
112
  @function flint-get-all-breakpoints() {
113
113
  $all-keys: flint-get-all-keys();
114
114
  $all-breakpoints: ();
@@ -120,52 +120,52 @@
120
120
  @return $all-breakpoints;
121
121
  }
122
122
 
123
- /**
124
- * Checks if passed $key is the highest breakpoint
125
- *
126
- * @access private
127
- *
128
- * @param {String} $key - alias of breakpoint
129
- *
130
- * @return {Bool}
131
- */
123
+ ///
124
+ /// Checks if passed $key is the highest breakpoint
125
+ ///
126
+ /// @access private
127
+ ///
128
+ /// @param {String} $key - alias of breakpoint
129
+ ///
130
+ /// @return {Bool}
131
+ ///
132
132
  @function flint-is-highest-breakpoint($key) {
133
133
  @return flint-get-value("breakpoints", $key, "breakpoint") == max(flint-get-all-breakpoints()...);
134
134
  }
135
135
 
136
- /**
137
- * Checks if passed $key is the lowest breakpoint
138
- *
139
- * @access private
140
- *
141
- * @param {String} $key - alias of breakpoint
142
- *
143
- * @return {Bool}
144
- */
136
+ ///
137
+ /// Checks if passed $key is the lowest breakpoint
138
+ ///
139
+ /// @access private
140
+ ///
141
+ /// @param {String} $key - alias of breakpoint
142
+ ///
143
+ /// @return {Bool}
144
+ ///
145
145
  @function flint-is-lowest-breakpoint($key) {
146
146
  @return flint-get-value("breakpoints", $key, "breakpoint") == min(flint-get-all-breakpoints()...);
147
147
  }
148
148
 
149
- /**
150
- * Checks if $key is grid default
151
- *
152
- * @access private
153
- *
154
- * @param {String} $key - alias of breakpoint
155
- *
156
- * @return {Bool}
157
- */
149
+ ///
150
+ /// Checks if $key is grid default
151
+ ///
152
+ /// @access private
153
+ ///
154
+ /// @param {String} $key - alias of breakpoint
155
+ ///
156
+ /// @return {Bool}
157
+ ///
158
158
  @function flint-is-default($key) {
159
159
  @return $key == flint-get-value("settings", "default");
160
160
  }
161
161
 
162
- /**
163
- * Gets all breakpoint column values
164
- *
165
- * @access private
166
- *
167
- * @return {List}
168
- */
162
+ ///
163
+ /// Gets all breakpoint column values
164
+ ///
165
+ /// @access private
166
+ ///
167
+ /// @return {List}
168
+ ///
169
169
  @function flint-get-all-columns() {
170
170
  $all-keys: flint-get-all-keys();
171
171
  $all-columns: ();
@@ -177,39 +177,39 @@
177
177
  @return $all-columns;
178
178
  }
179
179
 
180
- /**
181
- * Returns the unit used in config
182
- *
183
- * @access private
184
- *
185
- * @return {*}
186
- */
180
+ ///
181
+ /// Returns the unit used in config
182
+ ///
183
+ /// @access private
184
+ ///
185
+ /// @return {*}
186
+ ///
187
187
  @function flint-get-config-unit() {
188
188
  @return unit(flint-get-value("settings", "gutter"));
189
189
  }
190
190
 
191
- /**
192
- * Convert pixel value to em
193
- *
194
- * @access private
195
- *
196
- * @param {Number} $target - pixel value
197
- * @param {Number} $context - context to divide by
198
- *
199
- * @return {Number} em value of target relative to context
200
- */
191
+ ///
192
+ /// Convert pixel value to em
193
+ ///
194
+ /// @access private
195
+ ///
196
+ /// @param {Number} $target - pixel value
197
+ /// @param {Number} $context - context to divide by
198
+ ///
199
+ /// @return {Number} em value of target relative to context
200
+ ///
201
201
  @function flint-to-em($target, $context: $flint__base-font-size) {
202
202
  @return ($target / $context) * 1em;
203
203
  }
204
204
 
205
- /**
206
- * Use Ruby functions in place of Sass functions where possible
207
- * to speed up performance, especially with string functions
208
- *
209
- * @access private
210
- *
211
- * @return {Bool}
212
- */
205
+ ///
206
+ /// Use Ruby functions in place of Sass functions where possible
207
+ /// to speed up performance, especially with string functions
208
+ ///
209
+ /// @access private
210
+ ///
211
+ /// @return {Bool}
212
+ ///
213
213
  @function flint-use-ruby-functions() {
214
214
  @return flint_use_ruby() == true;
215
215
  }