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
@@ -1,18 +1,18 @@
|
|
1
|
-
//
|
2
|
-
// Get last item in list
|
3
|
-
//
|
4
|
-
@include describe("[function] last") {
|
5
|
-
|
6
|
-
$list: ("one", "two", "three");
|
7
|
-
|
8
|
-
@include it("should expect to return the last item in list") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-last($list)),
|
11
|
-
to(be("three"))
|
12
|
-
);
|
13
|
-
@include should(expect(
|
14
|
-
flint-last($list)),
|
15
|
-
not-to(be("two"))
|
16
|
-
);
|
17
|
-
}
|
18
|
-
}
|
1
|
+
//
|
2
|
+
// Get last item in list
|
3
|
+
//
|
4
|
+
@include describe("[function] last") {
|
5
|
+
|
6
|
+
$list: ("one", "two", "three");
|
7
|
+
|
8
|
+
@include it("should expect to return the last item in list") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-last($list)),
|
11
|
+
to(be("three"))
|
12
|
+
);
|
13
|
+
@include should(expect(
|
14
|
+
flint-last($list)),
|
15
|
+
not-to(be("two"))
|
16
|
+
);
|
17
|
+
}
|
18
|
+
}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
//
|
2
|
-
// Joins all elements of list with passed glue
|
3
|
-
//
|
4
|
-
@include describe("[function] list-to-str") {
|
5
|
-
|
6
|
-
$list: ("one", "two", "three");
|
7
|
-
|
8
|
-
@include it("should expect the list to be converted into a string without spaces") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-list-to-str($list)),
|
11
|
-
to(be("onetwothree"))
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
@include it("should expect the list to be converted into a string with spaces") {
|
16
|
-
@include should(expect(
|
17
|
-
flint-list-to-str($list, " ")),
|
18
|
-
to(be("one two three"))
|
19
|
-
);
|
20
|
-
}
|
21
|
-
|
22
|
-
@include it("should expect the list to be converted into a string with commas") {
|
23
|
-
@include should(expect(
|
24
|
-
flint-list-to-str($list, ", ")),
|
25
|
-
to(be("one, two, three"))
|
26
|
-
);
|
27
|
-
}
|
28
|
-
}
|
1
|
+
//
|
2
|
+
// Joins all elements of list with passed glue
|
3
|
+
//
|
4
|
+
@include describe("[function] list-to-str") {
|
5
|
+
|
6
|
+
$list: ("one", "two", "three");
|
7
|
+
|
8
|
+
@include it("should expect the list to be converted into a string without spaces") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-list-to-str($list)),
|
11
|
+
to(be("onetwothree"))
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
@include it("should expect the list to be converted into a string with spaces") {
|
16
|
+
@include should(expect(
|
17
|
+
flint-list-to-str($list, " ")),
|
18
|
+
to(be("one two three"))
|
19
|
+
);
|
20
|
+
}
|
21
|
+
|
22
|
+
@include it("should expect the list to be converted into a string with commas") {
|
23
|
+
@include should(expect(
|
24
|
+
flint-list-to-str($list, ", ")),
|
25
|
+
to(be("one, two, three"))
|
26
|
+
);
|
27
|
+
}
|
28
|
+
}
|
@@ -1,34 +1,34 @@
|
|
1
|
-
//
|
2
|
-
// Fetch value from map
|
3
|
-
//
|
4
|
-
@include describe("[function] map-fetch") {
|
5
|
-
|
6
|
-
$map: (
|
7
|
-
"key": "value",
|
8
|
-
"deep-map": (
|
9
|
-
"deep-key": "deep-value"
|
10
|
-
)
|
11
|
-
);
|
12
|
-
|
13
|
-
@include it("should expect values to be fetched from map") {
|
14
|
-
@include should(expect(
|
15
|
-
flint-map-fetch($map, "key")),
|
16
|
-
to(be("value"))
|
17
|
-
);
|
18
|
-
@include should(expect(
|
19
|
-
flint-map-fetch($map, "deep-map", "deep-key")),
|
20
|
-
to(be("deep-value"))
|
21
|
-
);
|
22
|
-
}
|
23
|
-
|
24
|
-
@include it("should expect non-existent values to return false") {
|
25
|
-
@include should(expect(
|
26
|
-
flint-map-fetch($map, "unknown")),
|
27
|
-
to(be(false))
|
28
|
-
);
|
29
|
-
@include should(expect(
|
30
|
-
flint-map-fetch($map, "deep-map", "unknown")),
|
31
|
-
to(be(false))
|
32
|
-
);
|
33
|
-
}
|
34
|
-
}
|
1
|
+
//
|
2
|
+
// Fetch value from map
|
3
|
+
//
|
4
|
+
@include describe("[function] map-fetch") {
|
5
|
+
|
6
|
+
$map: (
|
7
|
+
"key": "value",
|
8
|
+
"deep-map": (
|
9
|
+
"deep-key": "deep-value"
|
10
|
+
)
|
11
|
+
);
|
12
|
+
|
13
|
+
@include it("should expect values to be fetched from map") {
|
14
|
+
@include should(expect(
|
15
|
+
flint-map-fetch($map, "key")),
|
16
|
+
to(be("value"))
|
17
|
+
);
|
18
|
+
@include should(expect(
|
19
|
+
flint-map-fetch($map, "deep-map", "deep-key")),
|
20
|
+
to(be("deep-value"))
|
21
|
+
);
|
22
|
+
}
|
23
|
+
|
24
|
+
@include it("should expect non-existent values to return false") {
|
25
|
+
@include should(expect(
|
26
|
+
flint-map-fetch($map, "unknown")),
|
27
|
+
to(be(false))
|
28
|
+
);
|
29
|
+
@include should(expect(
|
30
|
+
flint-map-fetch($map, "deep-map", "unknown")),
|
31
|
+
to(be(false))
|
32
|
+
);
|
33
|
+
}
|
34
|
+
}
|
@@ -1,24 +1,24 @@
|
|
1
|
-
//
|
2
|
-
// Returns next indexed key based on passed index
|
3
|
-
//
|
4
|
-
@include describe("[function] next-index") {
|
5
|
-
|
6
|
-
@include it("should expect alias of next indexed breakpoint") {
|
7
|
-
@include should(expect(
|
8
|
-
flint-next-index(1)),
|
9
|
-
to(be("laptop"))
|
10
|
-
);
|
11
|
-
@include should(expect(
|
12
|
-
flint-next-index(2)),
|
13
|
-
to(be("tablet"))
|
14
|
-
);
|
15
|
-
@include should(expect(
|
16
|
-
flint-next-index(3)),
|
17
|
-
to(be("mobile"))
|
18
|
-
);
|
19
|
-
@include should(expect(
|
20
|
-
flint-next-index(4)),
|
21
|
-
to(be(false))
|
22
|
-
);
|
23
|
-
}
|
24
|
-
}
|
1
|
+
//
|
2
|
+
// Returns next indexed key based on passed index
|
3
|
+
//
|
4
|
+
@include describe("[function] next-index") {
|
5
|
+
|
6
|
+
@include it("should expect alias of next indexed breakpoint") {
|
7
|
+
@include should(expect(
|
8
|
+
flint-next-index(1)),
|
9
|
+
to(be("laptop"))
|
10
|
+
);
|
11
|
+
@include should(expect(
|
12
|
+
flint-next-index(2)),
|
13
|
+
to(be("tablet"))
|
14
|
+
);
|
15
|
+
@include should(expect(
|
16
|
+
flint-next-index(3)),
|
17
|
+
to(be("mobile"))
|
18
|
+
);
|
19
|
+
@include should(expect(
|
20
|
+
flint-next-index(4)),
|
21
|
+
to(be(false))
|
22
|
+
);
|
23
|
+
}
|
24
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
//
|
2
|
-
// Removes all false and null values from $list
|
3
|
-
//
|
4
|
-
@include describe("[function] purge") {
|
5
|
-
|
6
|
-
$list: (true, false, "string", "", null, 1);
|
7
|
-
|
8
|
-
@include it("should expect all falsey values to be removed") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-purge($list)),
|
11
|
-
to(be((true, "string", 1)))
|
12
|
-
);
|
13
|
-
}
|
14
|
-
}
|
1
|
+
//
|
2
|
+
// Removes all false and null values from $list
|
3
|
+
//
|
4
|
+
@include describe("[function] purge") {
|
5
|
+
|
6
|
+
$list: (true, false, "string", "", null, 1);
|
7
|
+
|
8
|
+
@include it("should expect all falsey values to be removed") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-purge($list)),
|
11
|
+
to(be((true, "string", 1)))
|
12
|
+
);
|
13
|
+
}
|
14
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
//
|
2
|
-
// Remove value from list
|
3
|
-
//
|
4
|
-
@include describe("[function] remove") {
|
5
|
-
|
6
|
-
$list: ("one", "two", "three");
|
7
|
-
|
8
|
-
@include it("should expect value to be removed from list") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-remove($list, "two")),
|
11
|
-
to(be(("one", "three")))
|
12
|
-
);
|
13
|
-
}
|
14
|
-
}
|
1
|
+
//
|
2
|
+
// Remove value from list
|
3
|
+
//
|
4
|
+
@include describe("[function] remove") {
|
5
|
+
|
6
|
+
$list: ("one", "two", "three");
|
7
|
+
|
8
|
+
@include it("should expect value to be removed from list") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-remove($list, "two")),
|
11
|
+
to(be(("one", "three")))
|
12
|
+
);
|
13
|
+
}
|
14
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
//
|
2
|
-
// Replaces old by new in $list
|
3
|
-
//
|
4
|
-
@include describe("[function] replace") {
|
5
|
-
|
6
|
-
$list: ("one", "two", "three");
|
7
|
-
|
8
|
-
@include it("should expect value to be replaced in list") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-replace($list, "three", "two, again")),
|
11
|
-
to(be(("one", "two", "two, again")))
|
12
|
-
);
|
13
|
-
}
|
14
|
-
}
|
1
|
+
//
|
2
|
+
// Replaces old by new in $list
|
3
|
+
//
|
4
|
+
@include describe("[function] replace") {
|
5
|
+
|
6
|
+
$list: ("one", "two", "three");
|
7
|
+
|
8
|
+
@include it("should expect value to be replaced in list") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-replace($list, "three", "two, again")),
|
11
|
+
to(be(("one", "two", "two, again")))
|
12
|
+
);
|
13
|
+
}
|
14
|
+
}
|
@@ -1,19 +1,19 @@
|
|
1
|
-
//
|
2
|
-
// Steal breakpoint key by index
|
3
|
-
//
|
4
|
-
@include describe("[function] steal-key") {
|
5
|
-
|
6
|
-
@include it("should expect breakpoint alias of passed index from configuration map") {
|
7
|
-
@include should(expect(
|
8
|
-
flint-steal-key(1)),
|
9
|
-
to(be("desktop"))
|
10
|
-
);
|
11
|
-
}
|
12
|
-
|
13
|
-
@include it("should expect invalid type to return false") {
|
14
|
-
@include should(expect(
|
15
|
-
flint-steal-key("string")),
|
16
|
-
to(be(false))
|
17
|
-
);
|
18
|
-
}
|
19
|
-
}
|
1
|
+
//
|
2
|
+
// Steal breakpoint key by index
|
3
|
+
//
|
4
|
+
@include describe("[function] steal-key") {
|
5
|
+
|
6
|
+
@include it("should expect breakpoint alias of passed index from configuration map") {
|
7
|
+
@include should(expect(
|
8
|
+
flint-steal-key(1)),
|
9
|
+
to(be("desktop"))
|
10
|
+
);
|
11
|
+
}
|
12
|
+
|
13
|
+
@include it("should expect invalid type to return false") {
|
14
|
+
@include should(expect(
|
15
|
+
flint-steal-key("string")),
|
16
|
+
to(be(false))
|
17
|
+
);
|
18
|
+
}
|
19
|
+
}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
//
|
2
|
-
// Steal breakpoint value by index
|
3
|
-
//
|
4
|
-
@include describe("[function] steal-values") {
|
5
|
-
|
6
|
-
@include it("should expect steal value from breakpoint key based on its index") {
|
7
|
-
@include should(expect(
|
8
|
-
flint-steal-values(1, "breakpoint")),
|
9
|
-
to(be(80em))
|
10
|
-
);
|
11
|
-
@include should(expect(
|
12
|
-
flint-steal-values(1, "columns")),
|
13
|
-
to(be(16))
|
14
|
-
);
|
15
|
-
}
|
16
|
-
}
|
1
|
+
//
|
2
|
+
// Steal breakpoint value by index
|
3
|
+
//
|
4
|
+
@include describe("[function] steal-values") {
|
5
|
+
|
6
|
+
@include it("should expect steal value from breakpoint key based on its index") {
|
7
|
+
@include should(expect(
|
8
|
+
flint-steal-values(1, "breakpoint")),
|
9
|
+
to(be(80em))
|
10
|
+
);
|
11
|
+
@include should(expect(
|
12
|
+
flint-steal-values(1, "columns")),
|
13
|
+
to(be(16))
|
14
|
+
);
|
15
|
+
}
|
16
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
//
|
2
|
-
// Replace substring
|
3
|
-
//
|
4
|
-
@include describe("[function] str-replace") {
|
5
|
-
|
6
|
-
$string: "this is a string";
|
7
|
-
|
8
|
-
@include it("should expect the substring to be updated inside of string") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-str-replace($string, "a", "an awesome")),
|
11
|
-
to(be("this is an awesome string"))
|
12
|
-
);
|
13
|
-
}
|
14
|
-
}
|
1
|
+
//
|
2
|
+
// Replace substring
|
3
|
+
//
|
4
|
+
@include describe("[function] str-replace") {
|
5
|
+
|
6
|
+
$string: "this is a string";
|
7
|
+
|
8
|
+
@include it("should expect the substring to be updated inside of string") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-str-replace($string, "a", "an awesome")),
|
11
|
+
to(be("this is an awesome string"))
|
12
|
+
);
|
13
|
+
}
|
14
|
+
}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
//
|
2
|
-
// Turns string into a flat list
|
3
|
-
//
|
4
|
-
@include describe("[function] str-to-list") {
|
5
|
-
|
6
|
-
$string: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
|
7
|
-
|
8
|
-
@include it("should expect string to be converted into a list") {
|
9
|
-
@include should(expect(
|
10
|
-
flint-str-to-list($string, " ", "")),
|
11
|
-
to(be(("Lorem", "ipsum", "dolor", "sit", "amet,", "consectetur", "adipiscing", "elit,", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua.")))
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
@include it("should expect string to be converted into a list") {
|
16
|
-
@include should(expect(
|
17
|
-
flint-str-to-list($string, " ", "d")),
|
18
|
-
to(be(("Lorem", "ipsum")))
|
19
|
-
);
|
20
|
-
}
|
21
|
-
|
22
|
-
@include it("should expect string up to comma to be converted into a list") {
|
23
|
-
@include should(expect(
|
24
|
-
flint-str-to-list($string)),
|
25
|
-
to(be(("Lorem", "ipsum", "dolor", "sit", "amet")))
|
26
|
-
);
|
27
|
-
}
|
28
|
-
}
|
1
|
+
//
|
2
|
+
// Turns string into a flat list
|
3
|
+
//
|
4
|
+
@include describe("[function] str-to-list") {
|
5
|
+
|
6
|
+
$string: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
|
7
|
+
|
8
|
+
@include it("should expect string to be converted into a list") {
|
9
|
+
@include should(expect(
|
10
|
+
flint-str-to-list($string, " ", "")),
|
11
|
+
to(be(("Lorem", "ipsum", "dolor", "sit", "amet,", "consectetur", "adipiscing", "elit,", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua.")))
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
@include it("should expect string to be converted into a list") {
|
16
|
+
@include should(expect(
|
17
|
+
flint-str-to-list($string, " ", "d")),
|
18
|
+
to(be(("Lorem", "ipsum")))
|
19
|
+
);
|
20
|
+
}
|
21
|
+
|
22
|
+
@include it("should expect string up to comma to be converted into a list") {
|
23
|
+
@include should(expect(
|
24
|
+
flint-str-to-list($string)),
|
25
|
+
to(be(("Lorem", "ipsum", "dolor", "sit", "amet")))
|
26
|
+
);
|
27
|
+
}
|
28
|
+
}
|