flint-gs 2.0.6 → 2.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -11
- data/lib/flint/version.rb +1 -1
- data/stylesheets/_flint.scss +3 -3
- data/stylesheets/flint/config/_config.scss +24 -24
- data/stylesheets/flint/functions/_functions.scss +9 -9
- data/stylesheets/flint/functions/helpers/_helpers.scss +138 -138
- data/stylesheets/flint/functions/lib/_calc-breakpoint.scss +13 -13
- data/stylesheets/flint/functions/lib/_calc-width.scss +17 -17
- data/stylesheets/flint/functions/lib/_exists.scss +12 -12
- data/stylesheets/flint/functions/lib/_fluid-width.scss +12 -12
- data/stylesheets/flint/functions/lib/_get-index.scss +11 -11
- data/stylesheets/flint/functions/lib/_get-instance-value.scss +12 -12
- data/stylesheets/flint/functions/lib/_get-value.scss +11 -11
- data/stylesheets/flint/functions/lib/_has-family-instance.scss +12 -12
- data/stylesheets/flint/functions/lib/_instance.scss +17 -17
- data/stylesheets/flint/functions/lib/_last.scss +11 -11
- data/stylesheets/flint/functions/lib/_list-to-string.scss +15 -15
- data/stylesheets/flint/functions/lib/_map-fetch.scss +12 -12
- data/stylesheets/flint/functions/lib/_next-index.scss +11 -11
- data/stylesheets/flint/functions/lib/_purge.scss +13 -13
- data/stylesheets/flint/functions/lib/_remove.scss +15 -15
- data/stylesheets/flint/functions/lib/_replace-substring.scss +13 -13
- data/stylesheets/flint/functions/lib/_replace.scss +15 -15
- data/stylesheets/flint/functions/lib/_steal-key.scss +11 -11
- data/stylesheets/flint/functions/lib/_steal-values.scss +12 -12
- data/stylesheets/flint/functions/lib/_string-to-list.scss +13 -13
- data/stylesheets/flint/functions/lib/_support-syntax-bem.scss +11 -11
- data/stylesheets/flint/functions/lib/_support-syntax.scss +12 -12
- data/stylesheets/flint/functions/lib/_types-in-list.scss +13 -13
- data/stylesheets/flint/functions/lib/_use-syntax.scss +11 -11
- data/stylesheets/flint/globals/_globals.scss +80 -80
- data/stylesheets/flint/mixins/_mixins.scss +3 -3
- data/stylesheets/flint/mixins/lib/_box-sizing.scss +11 -11
- data/stylesheets/flint/mixins/lib/_calculate.scss +45 -45
- data/stylesheets/flint/mixins/lib/_clearfix.scss +11 -11
- data/stylesheets/flint/mixins/lib/_container.scss +10 -10
- data/stylesheets/flint/mixins/lib/_main.scss +511 -511
- data/stylesheets/flint/mixins/lib/_new-instance.scss +15 -15
- data/stylesheets/flint/mixins/lib/_print-instance.scss +17 -17
- data/tests/bootcamp/_bootcamp.scss +0 -0
- data/tests/bootcamp/bootcamp.coffee +101 -0
- data/tests/bootcamp/core/functions/_actual.scss +0 -0
- data/tests/bootcamp/core/functions/_error.scss +0 -0
- data/tests/bootcamp/core/functions/_expect.scss +0 -0
- data/tests/bootcamp/core/functions/_not-to.scss +0 -0
- data/tests/bootcamp/core/functions/_should.scss +0 -0
- data/tests/bootcamp/core/functions/_to.scss +0 -0
- data/tests/bootcamp/core/mixins/_describe.scss +0 -0
- data/tests/bootcamp/core/mixins/_it.scss +0 -0
- data/tests/bootcamp/core/mixins/_runner.scss +0 -0
- data/tests/bootcamp/core/mixins/_should.scss +0 -0
- data/tests/bootcamp/core/mixins/_xdescribe.scss +0 -0
- data/tests/bootcamp/core/mixins/_xit.scss +0 -0
- data/tests/bootcamp/core/variables/_helpers.scss +0 -0
- data/tests/bootcamp/core/variables/_settings.scss +0 -0
- data/tests/bootcamp/core/variables/_should.scss +0 -0
- data/tests/bootcamp/core/variables/_trackers.scss +0 -0
- data/tests/bootcamp/lib/_sassyjson.scss +0 -0
- data/tests/bootcamp/matchers/_be.scss +0 -0
- data/tests/bootcamp/matchers/_equal.scss +0 -0
- data/tests/bootcamp/matchers/lists/_be-empty.scss +0 -0
- data/tests/bootcamp/matchers/lists/_be-longer-than.scss +0 -0
- data/tests/bootcamp/matchers/lists/_be-shorter-than.scss +0 -0
- data/tests/bootcamp/matchers/lists/_contain.scss +0 -0
- data/tests/bootcamp/matchers/lists/_deep-contain.scss +0 -0
- data/tests/bootcamp/matchers/lists/_deep-equal.scss +0 -0
- data/tests/bootcamp/matchers/lists/_have-length-of.scss +0 -0
- data/tests/bootcamp/matchers/numbers/_be-close-to.scss +0 -0
- data/tests/bootcamp/matchers/numbers/_be-greater-than.scss +0 -0
- data/tests/bootcamp/matchers/numbers/_be-less-than.scss +0 -0
- data/tests/bootcamp/matchers/types/_be-falsy.scss +0 -0
- data/tests/bootcamp/matchers/types/_be-null.scss +0 -0
- data/tests/bootcamp/matchers/types/_be-truthy.scss +0 -0
- data/tests/bootcamp/matchers/types/_have-type-of.scss +0 -0
- data/tests/bootcamp/utils/_contain.scss +0 -0
- data/tests/bootcamp/utils/_equal.scss +0 -0
- data/tests/bootcamp/utils/_list-join.scss +0 -0
- data/tests/bootcamp/utils/_power.scss +0 -0
- data/tests/input/functions/_functions.scss +9 -9
- data/tests/input/functions/helpers/_helpers.scss +45 -45
- data/tests/input/functions/lib/_calc-breakpoint.scss +3 -3
- data/tests/input/functions/lib/_calc-width.scss +3 -3
- data/tests/input/functions/lib/_exists.scss +3 -3
- data/tests/input/functions/lib/_fluid-width.scss +3 -3
- data/tests/input/functions/lib/_get-index.scss +3 -3
- data/tests/input/functions/lib/_get-instance-value.scss +3 -3
- data/tests/input/functions/lib/_get-value.scss +3 -3
- data/tests/input/functions/lib/_has-family-instance.scss +3 -3
- data/tests/input/functions/lib/_instance.scss +3 -3
- data/tests/input/functions/lib/_last.scss +3 -3
- data/tests/input/functions/lib/_list-to-string.scss +3 -3
- data/tests/input/functions/lib/_map-fetch.scss +3 -3
- data/tests/input/functions/lib/_next-index.scss +3 -3
- data/tests/input/functions/lib/_purge.scss +3 -3
- data/tests/input/functions/lib/_remove.scss +3 -3
- data/tests/input/functions/lib/_replace-substring.scss +3 -3
- data/tests/input/functions/lib/_replace.scss +3 -3
- data/tests/input/functions/lib/_steal-key.scss +3 -3
- data/tests/input/functions/lib/_steal-values.scss +3 -3
- data/tests/input/functions/lib/_string-to-list.scss +3 -3
- data/tests/input/functions/lib/_support-syntax-bem.scss +3 -3
- data/tests/input/functions/lib/_support-syntax.scss +3 -3
- data/tests/input/functions/lib/_types-in-list.scss +3 -3
- data/tests/input/functions/lib/_use-syntax.scss +3 -3
- data/tests/input/output.scss +22 -22
- metadata +4 -2
@@ -1,16 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
///
|
2
|
+
/// Calculate breakpoint query
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $type - type of query to get
|
7
|
+
/// @param {String} $key - key of breakpoint
|
8
|
+
/// @param {Number} $i - index of current breakpoint
|
9
|
+
///
|
10
|
+
/// @return {Number} - breakpoint value
|
11
|
+
///
|
12
|
+
/// @group Internal Functions
|
13
|
+
///
|
14
14
|
@function flint-calc-breakpoint($type, $key, $i) {
|
15
15
|
|
16
16
|
@if $type == "alias" {
|
@@ -1,17 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
///
|
2
|
+
/// Calculate width
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $key - key of breakpoint
|
7
|
+
/// @param {Number} $span - span value of element
|
8
|
+
/// @param {Number|String} $context (null) - context value of element
|
9
|
+
/// @param {Number} $deduct (null) - subtract value out of final width
|
10
|
+
///
|
11
|
+
/// @return {Map} - map of target and context result
|
12
|
+
///
|
13
|
+
/// @group Internal Functions
|
14
|
+
///
|
15
15
|
@function flint-calc-width($key, $span, $context: null, $deduct: null) {
|
16
16
|
$result: ();
|
17
17
|
|
@@ -26,9 +26,9 @@
|
|
26
26
|
|
27
27
|
} @else if $context == "auto" {
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
//
|
30
|
+
// Check if instance maps are enabled
|
31
|
+
//
|
32
32
|
@if not flint-get-value("settings", "instance-maps") {
|
33
33
|
@if not $flint__development-mode {
|
34
34
|
@error "Instance maps are disabled. Automatic context is not available. Enable `instance-maps` in the config to continue.";
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
///
|
2
|
+
/// Check if key exists in map
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {Map} $map - map to search
|
7
|
+
/// @param {String} $value - key to search for
|
8
|
+
///
|
9
|
+
/// @return {Bool}
|
10
|
+
///
|
11
|
+
/// @group Internal Functions
|
12
|
+
///
|
13
13
|
@function flint-exists($map, $value){
|
14
14
|
$is-map: flint-is-map($map);
|
15
15
|
$top-has-key: $is-map and map-has-key($map, $value) or false;
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
///
|
2
|
+
/// Convert fixed to fluid width
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {Number} $target
|
7
|
+
/// @param {Number} $context
|
8
|
+
///
|
9
|
+
/// @return {Number}
|
10
|
+
///
|
11
|
+
/// @group Internal Functions
|
12
|
+
///
|
13
13
|
@function flint-fluid-width($target, $context) {
|
14
14
|
@return ($target / $context) * 100%;
|
15
15
|
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
///
|
2
|
+
/// Gets the index of the passed key
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $key - breakpoint key
|
7
|
+
///
|
8
|
+
/// @return {Number}
|
9
|
+
///
|
10
|
+
/// @group Internal Functions
|
11
|
+
///
|
12
12
|
@function flint-get-index($key) {
|
13
13
|
|
14
14
|
@for $i from 1 through length(map-keys(flint-get-value("breakpoints"))) {
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
///
|
2
|
+
/// Get single value from key in instance map based on $selector::$key
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $key - breakpoint key to pass to instance method
|
7
|
+
/// @param {ArgList} $values - list of keys to fetch value from
|
8
|
+
///
|
9
|
+
/// @return {*}
|
10
|
+
///
|
11
|
+
/// @group Internal Functions
|
12
|
+
///
|
13
13
|
@function flint-get-instance-value($key, $values...) {
|
14
14
|
@return flint-map-fetch($flint__instances, flint-has-family-instance($key), $values...);
|
15
15
|
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
///
|
2
|
+
/// Get single value from configuration map
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {ArgList} $keys - list of keys to fetch value from
|
7
|
+
///
|
8
|
+
/// @return {*}
|
9
|
+
///
|
10
|
+
/// @group Internal Functions
|
11
|
+
///
|
12
12
|
@function flint-get-value($keys...) {
|
13
13
|
@return flint-map-fetch($flint, $keys...);
|
14
14
|
}
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
///
|
2
|
+
/// Checks if instance flint-exists in selector familiy tree, falls back from current selector
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $key - breakpoint key to search for matching instance
|
7
|
+
/// @param {String} $syntax - searches for instance using passed syntax parser
|
8
|
+
///
|
9
|
+
/// @return {String} instance selector
|
10
|
+
///
|
11
|
+
/// @group Internal Functions
|
12
|
+
///
|
13
13
|
@function flint-has-family-instance($key: flint-get-value("settings", "default"), $syntax: $flint__support-syntax) {
|
14
14
|
$selector: nth(&, 1);
|
15
15
|
|
@@ -1,20 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
///
|
2
|
+
/// Keeps count of all instances with arguments, stores in global var
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {String} $key - computed breakpoint of instance
|
7
|
+
/// @param {Number} $span - computed span of instance
|
8
|
+
/// @param {Number} $context - computed context of instance
|
9
|
+
/// @param {Number} $gutter - computed gutter of instance
|
10
|
+
/// @param {Number} $output-width - computed width of instance
|
11
|
+
/// @param {Number} $output-margin-right - computed right margin of instance
|
12
|
+
/// @param {Number} $output-margin-left - computed left margin of instance
|
13
|
+
///
|
14
|
+
/// @return {Map} merged instance map
|
15
|
+
///
|
16
|
+
/// @group Internal Functions
|
17
|
+
///
|
18
18
|
@function flint-instance($key, $span, $context, $gutter, $output-width, $output-margin-right, $output-margin-left) {
|
19
19
|
|
20
20
|
// Increase the instance count
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
///
|
2
|
+
/// Get last item in list
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {List} $list
|
7
|
+
///
|
8
|
+
/// @return {List}
|
9
|
+
///
|
10
|
+
/// @group Internal Functions
|
11
|
+
///
|
12
12
|
@function flint-last($list) {
|
13
13
|
@return nth($list, length($list));
|
14
14
|
}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
1
|
+
///
|
2
|
+
/// Joins all elements of list with passed glue
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @link http://sassylists.com/documentation/#to-string
|
7
|
+
///
|
8
|
+
/// @param {List} $list
|
9
|
+
/// @param {String} $glue
|
10
|
+
/// @param {Bool} $is-nested
|
11
|
+
///
|
12
|
+
/// @return {String}
|
13
|
+
///
|
14
|
+
/// @group Internal Functions
|
15
|
+
///
|
16
16
|
@function flint-list-to-string($list, $glue: "", $is-nested: false) {
|
17
17
|
|
18
18
|
// Use Ruby function if available
|
@@ -1,15 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
///
|
2
|
+
/// Fetch value from map
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {Map} $map - map to fetch value from
|
7
|
+
/// @param {ArgList} $keys - list of keys to traverse
|
8
|
+
///
|
9
|
+
/// @return {*}
|
10
|
+
///
|
11
|
+
/// @group Internal Functions
|
12
|
+
///
|
13
13
|
@function flint-map-fetch($map, $keys...) {
|
14
14
|
|
15
15
|
// Use Ruby function if available
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
///
|
2
|
+
/// Returns next indexed key based on passed index
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @param {Number} $index - index of breakpoint
|
7
|
+
///
|
8
|
+
/// @return {String}
|
9
|
+
///
|
10
|
+
/// @group Internal Functions
|
11
|
+
///
|
12
12
|
@function flint-next-index($index) {
|
13
13
|
@return if(flint-is-number($index) and $index != 0, flint-steal-key($index + 1), false);
|
14
14
|
}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
///
|
2
|
+
/// Removes all false and null values from $list
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @link http://sassylists.com/documentation.html#purge
|
7
|
+
///
|
8
|
+
/// @param {List} $list
|
9
|
+
///
|
10
|
+
/// @return {List}
|
11
|
+
///
|
12
|
+
/// @group Internal Functions
|
13
|
+
///
|
14
14
|
@function flint-purge($list) {
|
15
15
|
$result: ();
|
16
16
|
|
@@ -1,18 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
1
|
+
///
|
2
|
+
/// Remove value from list
|
3
|
+
///
|
4
|
+
/// @access private
|
5
|
+
///
|
6
|
+
/// @link http://sassylists.com/documentation/#remove
|
7
|
+
///
|
8
|
+
/// @param {List} $list
|
9
|
+
/// @param {*} $value
|
10
|
+
/// @param {Bool} $recursive
|
11
|
+
///
|
12
|
+
/// @return {List}
|
13
|
+
///
|
14
|
+
/// @group Internal Functions
|
15
|
+
///
|
16
16
|
@function flint-remove($list, $value) {
|
17
17
|
@return flint-replace($list, $value, null);
|
18
18
|
}
|