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.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +99 -98
- data/lib/flint-gs.rb +8 -0
- data/lib/flint.rb +22 -16
- data/lib/flint/functions.rb +99 -99
- data/lib/flint/version.rb +3 -3
- data/stylesheets/_flint.scss +7 -7
- data/stylesheets/flint/config/_config.scss +56 -56
- data/stylesheets/flint/functions/_functions.scss +48 -48
- data/stylesheets/flint/functions/helpers/_helpers.scss +229 -229
- data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +47 -47
- data/stylesheets/flint/functions/lib/_calc-width.scss +70 -70
- data/stylesheets/flint/functions/lib/_fluid-width.scss +15 -15
- data/stylesheets/flint/functions/lib/_get-index.scss +21 -21
- data/stylesheets/flint/functions/lib/_get-instance-value.scss +15 -15
- data/stylesheets/flint/functions/lib/_get-value.scss +14 -14
- data/stylesheets/flint/functions/lib/_has-family-instance.scss +84 -84
- data/stylesheets/flint/functions/lib/_html-encode.scss +14 -14
- data/stylesheets/flint/functions/lib/_instance.scss +48 -48
- data/stylesheets/flint/functions/lib/_last.scss +14 -14
- data/stylesheets/flint/functions/lib/_list-to-str.scss +38 -38
- data/stylesheets/flint/functions/lib/_map-fetch.scss +31 -31
- data/stylesheets/flint/functions/lib/_next-index.scss +14 -14
- data/stylesheets/flint/functions/lib/_purge.scss +24 -24
- data/stylesheets/flint/functions/lib/_remove.scss +18 -18
- data/stylesheets/flint/functions/lib/_replace.scss +30 -30
- data/stylesheets/flint/functions/lib/_steal-key.scss +32 -32
- data/stylesheets/flint/functions/lib/_steal-values.scss +15 -15
- data/stylesheets/flint/functions/lib/_str-replace.scss +39 -39
- data/stylesheets/flint/functions/lib/_str-to-list.scss +89 -89
- data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +37 -37
- data/stylesheets/flint/functions/lib/_support-syntax.scss +31 -31
- data/stylesheets/flint/functions/lib/_types-in-list.scss +76 -76
- data/stylesheets/flint/functions/lib/_use-syntax.scss +22 -22
- data/stylesheets/flint/globals/_globals.scss +122 -122
- data/stylesheets/flint/mixins/_mixins.scss +11 -11
- data/stylesheets/flint/mixins/lib/_box-sizing.scss +18 -18
- data/stylesheets/flint/mixins/lib/_calculate.scss +241 -241
- data/stylesheets/flint/mixins/lib/_clearfix.scss +29 -29
- data/stylesheets/flint/mixins/lib/_container.scss +45 -45
- data/stylesheets/flint/mixins/lib/_grid-overlay.scss +73 -73
- data/stylesheets/flint/mixins/lib/_main.scss +1057 -1057
- data/stylesheets/flint/mixins/lib/_new-instance.scss +28 -28
- data/stylesheets/flint/mixins/lib/_print-instance.scss +44 -44
- data/tests/config.rb +22 -34
- data/tests/input/functions/_functions.scss +47 -47
- data/tests/input/functions/helpers/_helpers.scss +437 -437
- data/tests/input/functions/lib/_calc-breakpoint.scss +62 -62
- data/tests/input/functions/lib/_calc-width.scss +195 -195
- data/tests/input/functions/lib/_fluid-width.scss +32 -32
- data/tests/input/functions/lib/_get-index.scss +31 -31
- data/tests/input/functions/lib/_get-instance-value.scss +72 -72
- data/tests/input/functions/lib/_get-value.scss +28 -28
- data/tests/input/functions/lib/_has-family-instance.scss +35 -35
- data/tests/input/functions/lib/_instance.scss +187 -187
- data/tests/input/functions/lib/_last.scss +18 -18
- data/tests/input/functions/lib/_list-to-str.scss +28 -28
- data/tests/input/functions/lib/_map-fetch.scss +34 -34
- data/tests/input/functions/lib/_next-index.scss +24 -24
- data/tests/input/functions/lib/_purge.scss +14 -14
- data/tests/input/functions/lib/_remove.scss +14 -14
- data/tests/input/functions/lib/_replace.scss +14 -14
- data/tests/input/functions/lib/_steal-key.scss +19 -19
- data/tests/input/functions/lib/_steal-values.scss +16 -16
- data/tests/input/functions/lib/_str-replace.scss +14 -14
- data/tests/input/functions/lib/_str-to-list.scss +28 -28
- data/tests/input/functions/lib/_support-syntax-bem.scss +14 -14
- data/tests/input/functions/lib/_support-syntax.scss +21 -21
- data/tests/input/functions/lib/_types-in-list.scss +50 -50
- data/tests/input/functions/lib/_use-syntax.scss +14 -14
- data/tests/input/output.scss +250 -250
- data/tests/output/output.css +3499 -3499
- data/tests/tests.html +110 -110
- metadata +12 -212
- data/tests/bootcamp/CHANGELOG.md +0 -70
- data/tests/bootcamp/CONTRIBUTING.md +0 -72
- data/tests/bootcamp/Gruntfile.coffee +0 -34
- data/tests/bootcamp/LICENSE.md +0 -7
- data/tests/bootcamp/README.md +0 -52
- data/tests/bootcamp/bower.json +0 -15
- data/tests/bootcamp/dist/_bootcamp.scss +0 -46
- data/tests/bootcamp/dist/bootcamp.coffee +0 -101
- data/tests/bootcamp/dist/core/functions/_actual.scss +0 -3
- data/tests/bootcamp/dist/core/functions/_error.scss +0 -29
- data/tests/bootcamp/dist/core/functions/_expect.scss +0 -6
- data/tests/bootcamp/dist/core/functions/_not-to.scss +0 -5
- data/tests/bootcamp/dist/core/functions/_should.scss +0 -6
- data/tests/bootcamp/dist/core/functions/_to.scss +0 -5
- data/tests/bootcamp/dist/core/mixins/_describe.scss +0 -31
- data/tests/bootcamp/dist/core/mixins/_it.scss +0 -31
- data/tests/bootcamp/dist/core/mixins/_runner.scss +0 -28
- data/tests/bootcamp/dist/core/mixins/_should.scss +0 -46
- data/tests/bootcamp/dist/core/mixins/_xdescribe.scss +0 -9
- data/tests/bootcamp/dist/core/mixins/_xit.scss +0 -9
- data/tests/bootcamp/dist/core/variables/_helpers.scss +0 -5
- data/tests/bootcamp/dist/core/variables/_settings.scss +0 -2
- data/tests/bootcamp/dist/core/variables/_should.scss +0 -6
- data/tests/bootcamp/dist/core/variables/_trackers.scss +0 -6
- data/tests/bootcamp/dist/lib/_sassyjson.scss +0 -1075
- data/tests/bootcamp/dist/matchers/_be.scss +0 -3
- data/tests/bootcamp/dist/matchers/_equal.scss +0 -3
- data/tests/bootcamp/dist/matchers/lists/_be-empty.scss +0 -3
- data/tests/bootcamp/dist/matchers/lists/_be-longer-than.scss +0 -3
- data/tests/bootcamp/dist/matchers/lists/_be-shorter-than.scss +0 -3
- data/tests/bootcamp/dist/matchers/lists/_contain.scss +0 -3
- data/tests/bootcamp/dist/matchers/lists/_deep-contain.scss +0 -3
- data/tests/bootcamp/dist/matchers/lists/_deep-equal.scss +0 -47
- data/tests/bootcamp/dist/matchers/lists/_have-length-of.scss +0 -3
- data/tests/bootcamp/dist/matchers/numbers/_be-close-to.scss +0 -12
- data/tests/bootcamp/dist/matchers/numbers/_be-greater-than.scss +0 -12
- data/tests/bootcamp/dist/matchers/numbers/_be-less-than.scss +0 -12
- data/tests/bootcamp/dist/matchers/types/_be-falsy.scss +0 -3
- data/tests/bootcamp/dist/matchers/types/_be-null.scss +0 -3
- data/tests/bootcamp/dist/matchers/types/_be-truthy.scss +0 -3
- data/tests/bootcamp/dist/matchers/types/_have-type-of.scss +0 -3
- data/tests/bootcamp/dist/utils/_contain.scss +0 -15
- data/tests/bootcamp/dist/utils/_equal.scss +0 -23
- data/tests/bootcamp/dist/utils/_list-join.scss +0 -35
- data/tests/bootcamp/dist/utils/_power.scss +0 -15
- data/tests/bootcamp/package.json +0 -63
- data/tests/bootcamp/tasks/bootcamp.coffee +0 -83
- data/tests/bootcamp/test/core/functions/_actual.scss +0 -10
- data/tests/bootcamp/test/core/functions/_expect.scss +0 -6
- data/tests/bootcamp/test/core/functions/_not-to.scss +0 -5
- data/tests/bootcamp/test/core/functions/_should.scss +0 -10
- data/tests/bootcamp/test/core/functions/_to.scss +0 -5
- data/tests/bootcamp/test/core/mixins/_describe.scss +0 -11
- data/tests/bootcamp/test/core/mixins/_it.scss +0 -5
- data/tests/bootcamp/test/core/mixins/_should.scss +0 -5
- data/tests/bootcamp/test/core/mixins/_xdescribe.scss +0 -28
- data/tests/bootcamp/test/core/mixins/_xit.scss +0 -12
- data/tests/bootcamp/test/matchers/_be.scss +0 -90
- data/tests/bootcamp/test/matchers/_equal.scss +0 -33
- data/tests/bootcamp/test/matchers/lists/_be-empty.scss +0 -12
- data/tests/bootcamp/test/matchers/lists/_be-longer-than.scss +0 -29
- data/tests/bootcamp/test/matchers/lists/_be-shorter-than.scss +0 -29
- data/tests/bootcamp/test/matchers/lists/_contain.scss +0 -39
- data/tests/bootcamp/test/matchers/lists/_deep-contain.scss +0 -51
- data/tests/bootcamp/test/matchers/lists/_deep-equal.scss +0 -151
- data/tests/bootcamp/test/matchers/lists/_have-length-of.scss +0 -31
- data/tests/bootcamp/test/matchers/numbers/_be-close-to.scss +0 -24
- data/tests/bootcamp/test/matchers/numbers/_be-greater-than.scss +0 -16
- data/tests/bootcamp/test/matchers/numbers/_be-less-than.scss +0 -16
- data/tests/bootcamp/test/matchers/types/_be-falsy.scss +0 -14
- data/tests/bootcamp/test/matchers/types/_be-null.scss +0 -13
- data/tests/bootcamp/test/matchers/types/_be-truthy.scss +0 -13
- data/tests/bootcamp/test/matchers/types/_have-type-of.scss +0 -17
- data/tests/bootcamp/test/specs.scss +0 -45
- data/tests/bootcamp/test/utils/_contain.scss +0 -41
- data/tests/bootcamp/test/utils/_equal.scss +0 -79
- data/tests/bootcamp/test/utils/_list-join.scss +0 -39
- data/tests/bootcamp/test/utils/_power.scss +0 -13
- data/tests/sass-prof.log +0 -0
data/lib/flint/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Flint
|
2
|
-
|
3
|
-
end
|
1
|
+
module Flint
|
2
|
+
VERSION = "2.3.7"
|
3
|
+
end
|
data/stylesheets/_flint.scss
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
//
|
2
|
-
// Flint
|
3
|
-
//
|
4
|
-
@import "flint/config/config";
|
5
|
-
@import "flint/functions/functions";
|
6
|
-
@import "flint/globals/globals";
|
7
|
-
@import "flint/mixins/mixins";
|
1
|
+
//
|
2
|
+
// Flint
|
3
|
+
//
|
4
|
+
@import "flint/config/config";
|
5
|
+
@import "flint/functions/functions";
|
6
|
+
@import "flint/globals/globals";
|
7
|
+
@import "flint/mixins/mixins";
|
@@ -1,56 +1,56 @@
|
|
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
|
-
$flint: (
|
26
|
-
"breakpoints": (
|
27
|
-
"desktop": (
|
28
|
-
"columns": 16,
|
29
|
-
"breakpoint": 80em
|
30
|
-
),
|
31
|
-
"laptop": (
|
32
|
-
"columns": 12,
|
33
|
-
"breakpoint": 60em
|
34
|
-
),
|
35
|
-
"tablet": (
|
36
|
-
"columns": 8,
|
37
|
-
"breakpoint": 40em
|
38
|
-
),
|
39
|
-
"mobile": (
|
40
|
-
"columns": 4,
|
41
|
-
"breakpoint": 20em
|
42
|
-
)
|
43
|
-
),
|
44
|
-
"settings": (
|
45
|
-
"default": "mobile",
|
46
|
-
"grid": "fluid",
|
47
|
-
"gutter": 0.625em,
|
48
|
-
"float-direction": "left",
|
49
|
-
"max-width": true,
|
50
|
-
"center-container": true,
|
51
|
-
"border-box-sizing": true,
|
52
|
-
"instance-maps": true,
|
53
|
-
"support-syntax": false,
|
54
|
-
"debug-mode": false
|
55
|
-
)
|
56
|
-
) !default;
|
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
|
+
$flint: (
|
26
|
+
"breakpoints": (
|
27
|
+
"desktop": (
|
28
|
+
"columns": 16,
|
29
|
+
"breakpoint": 80em
|
30
|
+
),
|
31
|
+
"laptop": (
|
32
|
+
"columns": 12,
|
33
|
+
"breakpoint": 60em
|
34
|
+
),
|
35
|
+
"tablet": (
|
36
|
+
"columns": 8,
|
37
|
+
"breakpoint": 40em
|
38
|
+
),
|
39
|
+
"mobile": (
|
40
|
+
"columns": 4,
|
41
|
+
"breakpoint": 20em
|
42
|
+
)
|
43
|
+
),
|
44
|
+
"settings": (
|
45
|
+
"default": "mobile",
|
46
|
+
"grid": "fluid",
|
47
|
+
"gutter": 0.625em,
|
48
|
+
"float-direction": "left",
|
49
|
+
"max-width": true,
|
50
|
+
"center-container": true,
|
51
|
+
"border-box-sizing": true,
|
52
|
+
"instance-maps": true,
|
53
|
+
"support-syntax": false,
|
54
|
+
"debug-mode": false
|
55
|
+
)
|
56
|
+
) !default;
|
@@ -1,48 +1,48 @@
|
|
1
|
-
//
|
2
|
-
// Helpers
|
3
|
-
//
|
4
|
-
@import "helpers/helpers";
|
5
|
-
|
6
|
-
//
|
7
|
-
// Functions
|
8
|
-
//
|
9
|
-
@import "lib/html-encode";
|
10
|
-
|
11
|
-
// Getters
|
12
|
-
@import "lib/map-fetch";
|
13
|
-
@import "lib/get-value";
|
14
|
-
@import "lib/get-index";
|
15
|
-
@import "lib/steal-key";
|
16
|
-
@import "lib/steal-values";
|
17
|
-
|
18
|
-
// Calculations
|
19
|
-
@import "lib/fluid-width";
|
20
|
-
@import "lib/calc-width";
|
21
|
-
@import "lib/calc-breakpoint";
|
22
|
-
|
23
|
-
// Instance functions
|
24
|
-
@import "lib/instance";
|
25
|
-
@import "lib/has-family-instance";
|
26
|
-
@import "lib/get-instance-value";
|
27
|
-
|
28
|
-
// List functions
|
29
|
-
@import "lib/list-to-str";
|
30
|
-
@import "lib/types-in-list";
|
31
|
-
@import "lib/next-index";
|
32
|
-
@import "lib/purge";
|
33
|
-
@import "lib/replace";
|
34
|
-
@import "lib/remove";
|
35
|
-
@import "lib/last";
|
36
|
-
|
37
|
-
// String functions
|
38
|
-
@import "lib/str-replace";
|
39
|
-
@import "lib/str-to-list";
|
40
|
-
|
41
|
-
//
|
42
|
-
// Support syntax
|
43
|
-
//
|
44
|
-
@import "lib/use-syntax";
|
45
|
-
@import "lib/support-syntax";
|
46
|
-
|
47
|
-
// Syntaxes
|
48
|
-
@import "lib/support-syntax-bem";
|
1
|
+
//
|
2
|
+
// Helpers
|
3
|
+
//
|
4
|
+
@import "helpers/helpers";
|
5
|
+
|
6
|
+
//
|
7
|
+
// Functions
|
8
|
+
//
|
9
|
+
@import "lib/html-encode";
|
10
|
+
|
11
|
+
// Getters
|
12
|
+
@import "lib/map-fetch";
|
13
|
+
@import "lib/get-value";
|
14
|
+
@import "lib/get-index";
|
15
|
+
@import "lib/steal-key";
|
16
|
+
@import "lib/steal-values";
|
17
|
+
|
18
|
+
// Calculations
|
19
|
+
@import "lib/fluid-width";
|
20
|
+
@import "lib/calc-width";
|
21
|
+
@import "lib/calc-breakpoint";
|
22
|
+
|
23
|
+
// Instance functions
|
24
|
+
@import "lib/instance";
|
25
|
+
@import "lib/has-family-instance";
|
26
|
+
@import "lib/get-instance-value";
|
27
|
+
|
28
|
+
// List functions
|
29
|
+
@import "lib/list-to-str";
|
30
|
+
@import "lib/types-in-list";
|
31
|
+
@import "lib/next-index";
|
32
|
+
@import "lib/purge";
|
33
|
+
@import "lib/replace";
|
34
|
+
@import "lib/remove";
|
35
|
+
@import "lib/last";
|
36
|
+
|
37
|
+
// String functions
|
38
|
+
@import "lib/str-replace";
|
39
|
+
@import "lib/str-to-list";
|
40
|
+
|
41
|
+
//
|
42
|
+
// Support syntax
|
43
|
+
//
|
44
|
+
@import "lib/use-syntax";
|
45
|
+
@import "lib/support-syntax";
|
46
|
+
|
47
|
+
// Syntaxes
|
48
|
+
@import "lib/support-syntax-bem";
|
@@ -1,229 +1,229 @@
|
|
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
|
-
@function flint-is-true($value) {
|
15
|
-
@return if($value == null, false, $value and $value != null and $value != "" and $value != ());
|
16
|
-
}
|
17
|
-
|
18
|
-
///
|
19
|
-
/// Checks if item is map
|
20
|
-
///
|
21
|
-
/// @access private
|
22
|
-
///
|
23
|
-
/// @param {Map} $n
|
24
|
-
///
|
25
|
-
/// @return {Bool}
|
26
|
-
///
|
27
|
-
@function flint-is-map($n) {
|
28
|
-
@return type-of($n) == "map";
|
29
|
-
}
|
30
|
-
|
31
|
-
///
|
32
|
-
/// Checks if item is list
|
33
|
-
///
|
34
|
-
/// @access private
|
35
|
-
///
|
36
|
-
/// @param {List} $n
|
37
|
-
///
|
38
|
-
/// @return {Bool}
|
39
|
-
///
|
40
|
-
@function flint-is-list($n) {
|
41
|
-
@return type-of($n) == "list";
|
42
|
-
}
|
43
|
-
|
44
|
-
///
|
45
|
-
/// Checks if item is number
|
46
|
-
///
|
47
|
-
/// @access private
|
48
|
-
///
|
49
|
-
/// @param {Number} $n
|
50
|
-
///
|
51
|
-
/// @return {Bool}
|
52
|
-
///
|
53
|
-
@function flint-is-number($n) {
|
54
|
-
@return type-of($n) == "number";
|
55
|
-
}
|
56
|
-
|
57
|
-
///
|
58
|
-
/// Checks if item is string
|
59
|
-
///
|
60
|
-
/// @access private
|
61
|
-
///
|
62
|
-
/// @param {String} $n
|
63
|
-
///
|
64
|
-
/// @return {Bool}
|
65
|
-
///
|
66
|
-
@function flint-is-string($n) {
|
67
|
-
@return type-of($n) == "string";
|
68
|
-
}
|
69
|
-
|
70
|
-
///
|
71
|
-
/// Checks if item is not string
|
72
|
-
///
|
73
|
-
/// @access private
|
74
|
-
///
|
75
|
-
/// @param {String} $n
|
76
|
-
///
|
77
|
-
/// @return {Bool}
|
78
|
-
///
|
79
|
-
@function flint-is-not-string($n) {
|
80
|
-
@return type-of($n) != "string";
|
81
|
-
}
|
82
|
-
|
83
|
-
///
|
84
|
-
/// Get gutter value from config map
|
85
|
-
///
|
86
|
-
/// @access private
|
87
|
-
///
|
88
|
-
/// @return {Number}
|
89
|
-
///
|
90
|
-
@function flint-get-gutter() {
|
91
|
-
@return flint-get-value("settings", "gutter");
|
92
|
-
}
|
93
|
-
|
94
|
-
///
|
95
|
-
/// Gets list of each breakpoint's key
|
96
|
-
///
|
97
|
-
/// @access private
|
98
|
-
///
|
99
|
-
/// @return {List}
|
100
|
-
///
|
101
|
-
@function flint-get-all-keys() {
|
102
|
-
@return map-keys(flint-get-value("breakpoints"));
|
103
|
-
}
|
104
|
-
|
105
|
-
///
|
106
|
-
/// Gets list of all breakpoints
|
107
|
-
///
|
108
|
-
/// @access private
|
109
|
-
///
|
110
|
-
/// @return {List}
|
111
|
-
///
|
112
|
-
@function flint-get-all-breakpoints() {
|
113
|
-
$all-keys: flint-get-all-keys();
|
114
|
-
$all-breakpoints: ();
|
115
|
-
|
116
|
-
@each $key in $all-keys {
|
117
|
-
$all-breakpoints: append($all-breakpoints, flint-get-value("breakpoints", $key, "breakpoint"), "comma");
|
118
|
-
}
|
119
|
-
|
120
|
-
@return $all-breakpoints;
|
121
|
-
}
|
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
|
-
///
|
132
|
-
@function flint-is-highest-breakpoint($key) {
|
133
|
-
@return flint-get-value("breakpoints", $key, "breakpoint") == max(flint-get-all-breakpoints()...);
|
134
|
-
}
|
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
|
-
///
|
145
|
-
@function flint-is-lowest-breakpoint($key) {
|
146
|
-
@return flint-get-value("breakpoints", $key, "breakpoint") == min(flint-get-all-breakpoints()...);
|
147
|
-
}
|
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
|
-
///
|
158
|
-
@function flint-is-default($key) {
|
159
|
-
@return $key == flint-get-value("settings", "default");
|
160
|
-
}
|
161
|
-
|
162
|
-
///
|
163
|
-
/// Gets all breakpoint column values
|
164
|
-
///
|
165
|
-
/// @access private
|
166
|
-
///
|
167
|
-
/// @return {List}
|
168
|
-
///
|
169
|
-
@function flint-get-all-columns() {
|
170
|
-
$all-keys: flint-get-all-keys();
|
171
|
-
$all-columns: ();
|
172
|
-
|
173
|
-
@each $key in $all-keys {
|
174
|
-
$all-columns: append($all-columns, flint-get-value("breakpoints", $key, "columns"), "comma");
|
175
|
-
}
|
176
|
-
|
177
|
-
@return $all-columns;
|
178
|
-
}
|
179
|
-
|
180
|
-
///
|
181
|
-
/// Returns the unit used in config
|
182
|
-
///
|
183
|
-
/// @access private
|
184
|
-
///
|
185
|
-
/// @return {*}
|
186
|
-
///
|
187
|
-
@function flint-get-config-unit() {
|
188
|
-
@return unit(flint-get-value("settings", "gutter"));
|
189
|
-
}
|
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
|
-
///
|
201
|
-
@function flint-to-em($target, $context: $flint-base-font-size) {
|
202
|
-
@return ($target / $context) * 1em;
|
203
|
-
}
|
204
|
-
|
205
|
-
//
|
206
|
-
/// Convert pixel value to rem
|
207
|
-
///
|
208
|
-
/// @access private
|
209
|
-
///
|
210
|
-
/// @param {Number} $target - pixel value
|
211
|
-
/// @param {Number} $context - context to divide by
|
212
|
-
///
|
213
|
-
/// @return {Number} rem value of target relative to context
|
214
|
-
///
|
215
|
-
@function flint-to-rem($target, $context: $flint-base-font-size) {
|
216
|
-
@return ($target / $context) * 1rem;
|
217
|
-
}
|
218
|
-
|
219
|
-
///
|
220
|
-
/// Use Ruby functions in place of Sass functions where possible
|
221
|
-
/// to speed up performance, especially with string functions
|
222
|
-
///
|
223
|
-
/// @access private
|
224
|
-
///
|
225
|
-
/// @return {Bool}
|
226
|
-
///
|
227
|
-
@function flint-use-ruby-functions() {
|
228
|
-
@return flint_use_ruby() == true;
|
229
|
-
}
|
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
|
+
@function flint-is-true($value) {
|
15
|
+
@return if($value == null, false, $value and $value != null and $value != "" and $value != ());
|
16
|
+
}
|
17
|
+
|
18
|
+
///
|
19
|
+
/// Checks if item is map
|
20
|
+
///
|
21
|
+
/// @access private
|
22
|
+
///
|
23
|
+
/// @param {Map} $n
|
24
|
+
///
|
25
|
+
/// @return {Bool}
|
26
|
+
///
|
27
|
+
@function flint-is-map($n) {
|
28
|
+
@return type-of($n) == "map";
|
29
|
+
}
|
30
|
+
|
31
|
+
///
|
32
|
+
/// Checks if item is list
|
33
|
+
///
|
34
|
+
/// @access private
|
35
|
+
///
|
36
|
+
/// @param {List} $n
|
37
|
+
///
|
38
|
+
/// @return {Bool}
|
39
|
+
///
|
40
|
+
@function flint-is-list($n) {
|
41
|
+
@return type-of($n) == "list";
|
42
|
+
}
|
43
|
+
|
44
|
+
///
|
45
|
+
/// Checks if item is number
|
46
|
+
///
|
47
|
+
/// @access private
|
48
|
+
///
|
49
|
+
/// @param {Number} $n
|
50
|
+
///
|
51
|
+
/// @return {Bool}
|
52
|
+
///
|
53
|
+
@function flint-is-number($n) {
|
54
|
+
@return type-of($n) == "number";
|
55
|
+
}
|
56
|
+
|
57
|
+
///
|
58
|
+
/// Checks if item is string
|
59
|
+
///
|
60
|
+
/// @access private
|
61
|
+
///
|
62
|
+
/// @param {String} $n
|
63
|
+
///
|
64
|
+
/// @return {Bool}
|
65
|
+
///
|
66
|
+
@function flint-is-string($n) {
|
67
|
+
@return type-of($n) == "string";
|
68
|
+
}
|
69
|
+
|
70
|
+
///
|
71
|
+
/// Checks if item is not string
|
72
|
+
///
|
73
|
+
/// @access private
|
74
|
+
///
|
75
|
+
/// @param {String} $n
|
76
|
+
///
|
77
|
+
/// @return {Bool}
|
78
|
+
///
|
79
|
+
@function flint-is-not-string($n) {
|
80
|
+
@return type-of($n) != "string";
|
81
|
+
}
|
82
|
+
|
83
|
+
///
|
84
|
+
/// Get gutter value from config map
|
85
|
+
///
|
86
|
+
/// @access private
|
87
|
+
///
|
88
|
+
/// @return {Number}
|
89
|
+
///
|
90
|
+
@function flint-get-gutter() {
|
91
|
+
@return flint-get-value("settings", "gutter");
|
92
|
+
}
|
93
|
+
|
94
|
+
///
|
95
|
+
/// Gets list of each breakpoint's key
|
96
|
+
///
|
97
|
+
/// @access private
|
98
|
+
///
|
99
|
+
/// @return {List}
|
100
|
+
///
|
101
|
+
@function flint-get-all-keys() {
|
102
|
+
@return map-keys(flint-get-value("breakpoints"));
|
103
|
+
}
|
104
|
+
|
105
|
+
///
|
106
|
+
/// Gets list of all breakpoints
|
107
|
+
///
|
108
|
+
/// @access private
|
109
|
+
///
|
110
|
+
/// @return {List}
|
111
|
+
///
|
112
|
+
@function flint-get-all-breakpoints() {
|
113
|
+
$all-keys: flint-get-all-keys();
|
114
|
+
$all-breakpoints: ();
|
115
|
+
|
116
|
+
@each $key in $all-keys {
|
117
|
+
$all-breakpoints: append($all-breakpoints, flint-get-value("breakpoints", $key, "breakpoint"), "comma");
|
118
|
+
}
|
119
|
+
|
120
|
+
@return $all-breakpoints;
|
121
|
+
}
|
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
|
+
///
|
132
|
+
@function flint-is-highest-breakpoint($key) {
|
133
|
+
@return flint-get-value("breakpoints", $key, "breakpoint") == max(flint-get-all-breakpoints()...);
|
134
|
+
}
|
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
|
+
///
|
145
|
+
@function flint-is-lowest-breakpoint($key) {
|
146
|
+
@return flint-get-value("breakpoints", $key, "breakpoint") == min(flint-get-all-breakpoints()...);
|
147
|
+
}
|
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
|
+
///
|
158
|
+
@function flint-is-default($key) {
|
159
|
+
@return $key == flint-get-value("settings", "default");
|
160
|
+
}
|
161
|
+
|
162
|
+
///
|
163
|
+
/// Gets all breakpoint column values
|
164
|
+
///
|
165
|
+
/// @access private
|
166
|
+
///
|
167
|
+
/// @return {List}
|
168
|
+
///
|
169
|
+
@function flint-get-all-columns() {
|
170
|
+
$all-keys: flint-get-all-keys();
|
171
|
+
$all-columns: ();
|
172
|
+
|
173
|
+
@each $key in $all-keys {
|
174
|
+
$all-columns: append($all-columns, flint-get-value("breakpoints", $key, "columns"), "comma");
|
175
|
+
}
|
176
|
+
|
177
|
+
@return $all-columns;
|
178
|
+
}
|
179
|
+
|
180
|
+
///
|
181
|
+
/// Returns the unit used in config
|
182
|
+
///
|
183
|
+
/// @access private
|
184
|
+
///
|
185
|
+
/// @return {*}
|
186
|
+
///
|
187
|
+
@function flint-get-config-unit() {
|
188
|
+
@return unit(flint-get-value("settings", "gutter"));
|
189
|
+
}
|
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
|
+
///
|
201
|
+
@function flint-to-em($target, $context: $flint-base-font-size) {
|
202
|
+
@return ($target / $context) * 1em;
|
203
|
+
}
|
204
|
+
|
205
|
+
//
|
206
|
+
/// Convert pixel value to rem
|
207
|
+
///
|
208
|
+
/// @access private
|
209
|
+
///
|
210
|
+
/// @param {Number} $target - pixel value
|
211
|
+
/// @param {Number} $context - context to divide by
|
212
|
+
///
|
213
|
+
/// @return {Number} rem value of target relative to context
|
214
|
+
///
|
215
|
+
@function flint-to-rem($target, $context: $flint-base-font-size) {
|
216
|
+
@return ($target / $context) * 1rem;
|
217
|
+
}
|
218
|
+
|
219
|
+
///
|
220
|
+
/// Use Ruby functions in place of Sass functions where possible
|
221
|
+
/// to speed up performance, especially with string functions
|
222
|
+
///
|
223
|
+
/// @access private
|
224
|
+
///
|
225
|
+
/// @return {Bool}
|
226
|
+
///
|
227
|
+
@function flint-use-ruby-functions() {
|
228
|
+
@return flint_use_ruby() == true;
|
229
|
+
}
|