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,14 +1,14 @@
1
- //
2
- // Parser to support BEM syntax
3
- //
4
- @include describe("[function] support-syntax-bem") {
5
-
6
- $selectors: ".block__element__element--modifier";
7
-
8
- @include it("should expect selector string to be parsed to valid list of BEM selectors") {
9
- @include should(expect(
10
- flint-support-syntax-bem($selectors)),
11
- to(be((".block", ".block__element", ".block__element__element--modifier")))
12
- );
13
- }
14
- }
1
+ //
2
+ // Parser to support BEM syntax
3
+ //
4
+ @include describe("[function] support-syntax-bem") {
5
+
6
+ $selectors: ".block__element__element--modifier";
7
+
8
+ @include it("should expect selector string to be parsed to valid list of BEM selectors") {
9
+ @include should(expect(
10
+ flint-support-syntax-bem($selectors)),
11
+ to(be((".block", ".block__element", ".block__element__element--modifier")))
12
+ );
13
+ }
14
+ }
@@ -1,21 +1,21 @@
1
- //
2
- // Support syntax
3
- //
4
- @include describe("[function] support-syntax") {
5
-
6
- $selectors: ".block__element--modifier";
7
-
8
- @include it("should expect truthy value to return from supported syntax") {
9
- @include should(expect(
10
- flint-support-syntax("BEM", $selectors)),
11
- to(be-truthy())
12
- );
13
- }
14
-
15
- @include it("should expect to return null if invalid syntax is passed") {
16
- @include should(expect(
17
- flint-support-syntax("OOCSS", $selectors)),
18
- to(be((false)))
19
- );
20
- }
21
- }
1
+ //
2
+ // Support syntax
3
+ //
4
+ @include describe("[function] support-syntax") {
5
+
6
+ $selectors: ".block__element--modifier";
7
+
8
+ @include it("should expect truthy value to return from supported syntax") {
9
+ @include should(expect(
10
+ flint-support-syntax("BEM", $selectors)),
11
+ to(be-truthy())
12
+ );
13
+ }
14
+
15
+ @include it("should expect to return null if invalid syntax is passed") {
16
+ @include should(expect(
17
+ flint-support-syntax("OOCSS", $selectors)),
18
+ to(be((false)))
19
+ );
20
+ }
21
+ }
@@ -1,50 +1,50 @@
1
- //
2
- // Checks type of each item in list
3
- //
4
- @include describe("[function] types-in-list") {
5
-
6
- $list-of-numbers: 1, 2, 3, 4, 5;
7
- $list-of-strings: "one", "two", "three";
8
- $mixed-list: 1, "two", 3, "four";
9
- $string: "string";
10
-
11
- @include it("should expect to return false if list is not passed") {
12
- @include should(expect(
13
- flint-types-in-list($string)),
14
- to(be(false))
15
- );
16
- }
17
-
18
- @include it("should expect types to be asserted in list") {
19
- @include should(expect(
20
- flint-types-in-list($list-of-numbers)),
21
- to(be(true))
22
- );
23
- @include should(expect(
24
- flint-types-in-list($list-of-numbers, "number")),
25
- to(be((true)))
26
- );
27
- @include should(expect(
28
- flint-types-in-list($list-of-strings, "string", 3)),
29
- to(be((true)))
30
- );
31
- @include should(expect(
32
- flint-types-in-list($mixed-list, "number" "string" "number" "string", 4)),
33
- to(be((true)))
34
- );
35
- }
36
-
37
- @include it("should expect auto asserted types to return false") {
38
- @include should(expect(
39
- flint-types-in-list($mixed-list)),
40
- to(be((false)))
41
- );
42
- }
43
-
44
- @include it("should expect asserted length to return false") {
45
- @include should(expect(
46
- flint-types-in-list($list-of-strings, "string", 1)),
47
- to(be((false)))
48
- );
49
- }
50
- }
1
+ //
2
+ // Checks type of each item in list
3
+ //
4
+ @include describe("[function] types-in-list") {
5
+
6
+ $list-of-numbers: 1, 2, 3, 4, 5;
7
+ $list-of-strings: "one", "two", "three";
8
+ $mixed-list: 1, "two", 3, "four";
9
+ $string: "string";
10
+
11
+ @include it("should expect to return false if list is not passed") {
12
+ @include should(expect(
13
+ flint-types-in-list($string)),
14
+ to(be(false))
15
+ );
16
+ }
17
+
18
+ @include it("should expect types to be asserted in list") {
19
+ @include should(expect(
20
+ flint-types-in-list($list-of-numbers)),
21
+ to(be(true))
22
+ );
23
+ @include should(expect(
24
+ flint-types-in-list($list-of-numbers, "number")),
25
+ to(be((true)))
26
+ );
27
+ @include should(expect(
28
+ flint-types-in-list($list-of-strings, "string", 3)),
29
+ to(be((true)))
30
+ );
31
+ @include should(expect(
32
+ flint-types-in-list($mixed-list, "number" "string" "number" "string", 4)),
33
+ to(be((true)))
34
+ );
35
+ }
36
+
37
+ @include it("should expect auto asserted types to return false") {
38
+ @include should(expect(
39
+ flint-types-in-list($mixed-list)),
40
+ to(be((false)))
41
+ );
42
+ }
43
+
44
+ @include it("should expect asserted length to return false") {
45
+ @include should(expect(
46
+ flint-types-in-list($list-of-strings, "string", 1)),
47
+ to(be((false)))
48
+ );
49
+ }
50
+ }
@@ -1,14 +1,14 @@
1
- //
2
- // Use global syntax
3
- //
4
- @include describe("[function] use-syntax") {
5
-
6
- $selectors: ".block__element--modifier";
7
-
8
- @include it("should expect to return false unless syntax is set") {
9
- @include should(expect(
10
- flint-use-syntax($selectors)),
11
- to(be(false))
12
- );
13
- }
14
- }
1
+ //
2
+ // Use global syntax
3
+ //
4
+ @include describe("[function] use-syntax") {
5
+
6
+ $selectors: ".block__element--modifier";
7
+
8
+ @include it("should expect to return false unless syntax is set") {
9
+ @include should(expect(
10
+ flint-use-syntax($selectors)),
11
+ to(be(false))
12
+ );
13
+ }
14
+ }
@@ -1,250 +1,250 @@
1
- ///
2
- /// Configuration map
3
- ///
4
-
5
- // Bootcamp
6
- @import "../bootcamp/dist/bootcamp";
7
-
8
- // Flint
9
- @import "../../stylesheets/flint";
10
-
11
- $flint: (
12
- "breakpoints": (
13
- "desktop": (
14
- "columns": 16,
15
- "breakpoint": 80em,
16
- ),
17
- "laptop": (
18
- "columns": 12,
19
- "breakpoint": 60em,
20
- ),
21
- "tablet": (
22
- "columns": 8,
23
- "breakpoint": 40em,
24
- ),
25
- "mobile": (
26
- "columns": 4,
27
- "breakpoint": 20em,
28
- ),
29
- ),
30
- "settings": (
31
- "default": "mobile",
32
- "grid": "fluid",
33
- "gutter": 0.625em,
34
- "float-direction": "left",
35
- "max-width": true,
36
- "center-container": true,
37
- "border-box-sizing": true,
38
- "instance-maps": true,
39
- "support-syntax": false,
40
- "debug-mode": true,
41
- )
42
- ) !global;
43
-
44
- // Quick reset
45
- body {
46
- margin: 0;
47
- padding: 0;
48
- }
49
-
50
- // Enable development mode
51
- $flint-development-mode: true !global;
52
-
53
- // Test speed improvements
54
- $flint-use-ruby-functions: false !global;
55
-
56
- ///
57
- /// BEGIN TESTS
58
- /// -----------
59
- ///
60
- @include runner-start;
61
- ///
62
- /// -----------
63
- /// BEGIN TESTS
64
- ///
65
-
66
- @include it("should expect foundation to not be set") {
67
- @include should(expect($flint-foundation),
68
- to(be(false))
69
- );
70
- }
71
-
72
- @include _("foundation");
73
-
74
- @include it("should expect foundation to be set") {
75
- @include should(expect($flint-foundation),
76
- to(be(true))
77
- );
78
- }
79
-
80
- @import "functions/functions";
81
-
82
- ///
83
- /// END TESTS
84
- /// ---------
85
- ///
86
- @include runner-end;
87
- ///
88
- /// ---------
89
- /// END TESTS
90
- ///
91
-
92
-
93
-
94
- ///
95
- /// Visual HTML test
96
- ///
97
- $color__blue: #2C3F52;
98
- $color__blue--dark: #15202A;
99
- $color__blue--darkest: #0E181E;
100
- $color__yellow: #FFF87B;
101
-
102
- // Pseudo content
103
- @mixin col-num($i) {
104
- &:before {
105
- @include _(desktop) {
106
- content: "#{$i} of 16";
107
- }
108
- @include _(laptop) {
109
- @if $i > 12 { $i: 12; }
110
- content: "#{$i} of 12";
111
- }
112
- @include _(tablet) {
113
- @if $i > 8 { $i: 8; }
114
- content: "#{$i} of 8";
115
- }
116
- @include _(mobile) {
117
- @if $i > 4 { $i: 4; }
118
- content: "#{$i} of 4";
119
- }
120
- }
121
- }
122
-
123
- // Generate cols
124
- @for $i from 1 through 16 {
125
- .col-#{$i} {
126
-
127
- @if $i == 16 {
128
-
129
- @include _($i 12 8 4);
130
- @include col-num($i);
131
-
132
- .col-#{$i}-child {
133
- @include _($i/2 12/2 8/2 4/2, auto);
134
- @include col-num($i/2);
135
-
136
- .col-#{$i}-grandchild {
137
- @include _($i/4 12/4 8/4 4/4, auto);
138
- @include col-num($i/4);
139
- }
140
- }
141
-
142
- } @else if $i > 12 {
143
-
144
- @include _($i 12 8 4);
145
- @include col-num($i);
146
-
147
- .col-#{$i}-child {
148
- @include _($i/2 12/2 8/2 4/2, auto);
149
- @include col-num($i/2);
150
- }
151
-
152
- } @else if $i > 8 {
153
-
154
- @include _($i $i 8 4);
155
- @include col-num($i);
156
-
157
- .col-#{$i}-child {
158
- @include _($i/2 $i/2 8/2 4/2, auto);
159
- @include col-num($i/2);
160
- }
161
-
162
- } @else if $i > 4 {
163
-
164
- @include _($i $i $i 4);
165
- @include col-num($i);
166
-
167
- .col-#{$i}-child {
168
- @include _($i/2 $i/2 $i/2 4/2, auto);
169
- @include col-num($i/2);
170
- }
171
-
172
- } @else {
173
-
174
- @include _($i);
175
- @include col-num($i);
176
-
177
- .col-#{$i}-child {
178
- @include _($i, auto);
179
- @include col-num($i);
180
- }
181
-
182
- }
183
-
184
- // background: if($i > 10, darken($color__blue, ($i*0.25)), lighten($color__blue, (16/$i)));
185
- clear: both;
186
-
187
- div {
188
- // background: if($i > 10, lighten($color__blue, ($i*0.25)), darken($color__blue, (16/$i)));
189
- height: 100% !important;
190
-
191
- div {
192
- // background: if($i > 10, darken($color__blue, ($i*0.25)), lighten($color__blue, (16/$i)));
193
- }
194
- }
195
- }
196
- }
197
-
198
- .col-third {
199
- @include _(16/3 12/3 8/3 4/3);
200
- // background: $color__blue;
201
-
202
- &:before { content: "1/3"; }
203
- }
204
-
205
- .col-fourth {
206
- @include _(16/4 12/4 8/4 4/4);
207
- // background: $color__blue;
208
-
209
- &:before { content: "1/4"; }
210
- }
211
-
212
- .col-fifth {
213
- @include _(16/5 12/5 8/5 4/5);
214
- // background: $color__blue;
215
-
216
- &:before { content: "1/5"; }
217
-
218
- .col-fifth-child {
219
- @include _((16/5)/3 (12/5)/3 (8/5)/3 (4/5)/3, auto);
220
- height: 100% !important;
221
- }
222
- }
223
-
224
- div[class*="col"] {
225
- position: relative;
226
- font: 10px Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
227
- color: $color__yellow;
228
- height: 120px;
229
- margin-top: 10px;
230
- margin-bottom: 10px;
231
- padding: 2em 0;
232
- outline: lighten($color__blue, 10%) solid 2px;
233
-
234
- &:before {
235
- position: absolute;
236
- top: 1em;
237
- left: 1em;
238
- }
239
- }
240
-
241
- section {
242
- background: $color__blue--darkest;
243
- // & + & { background: darken($color__blue--darkest, 5%); }
244
- // & + & + & { background: darken($color__blue--darkest, 10%); }
245
- // & + & + & + & { background: darken($color__blue--darkest, 15%); }
246
- }
247
-
248
- .container {
249
- @include _(container, clear);
250
- }
1
+ ///
2
+ /// Configuration map
3
+ ///
4
+
5
+ // Bootcamp
6
+ @import "../bootcamp/dist/bootcamp";
7
+
8
+ // Flint
9
+ @import "../../stylesheets/flint";
10
+
11
+ $flint: (
12
+ "breakpoints": (
13
+ "desktop": (
14
+ "columns": 16,
15
+ "breakpoint": 80em,
16
+ ),
17
+ "laptop": (
18
+ "columns": 12,
19
+ "breakpoint": 60em,
20
+ ),
21
+ "tablet": (
22
+ "columns": 8,
23
+ "breakpoint": 40em,
24
+ ),
25
+ "mobile": (
26
+ "columns": 4,
27
+ "breakpoint": 20em,
28
+ ),
29
+ ),
30
+ "settings": (
31
+ "default": "mobile",
32
+ "grid": "fluid",
33
+ "gutter": 0.625em,
34
+ "float-direction": "left",
35
+ "max-width": true,
36
+ "center-container": true,
37
+ "border-box-sizing": true,
38
+ "instance-maps": true,
39
+ "support-syntax": false,
40
+ "debug-mode": true,
41
+ )
42
+ ) !global;
43
+
44
+ // Quick reset
45
+ body {
46
+ margin: 0;
47
+ padding: 0;
48
+ }
49
+
50
+ // Enable development mode
51
+ $flint-development-mode: true !global;
52
+
53
+ // Test speed improvements
54
+ // $flint-use-ruby-functions: false !global;
55
+
56
+ ///
57
+ /// BEGIN TESTS
58
+ /// -----------
59
+ ///
60
+ @include runner-start;
61
+ ///
62
+ /// -----------
63
+ /// BEGIN TESTS
64
+ ///
65
+
66
+ @include it("should expect foundation to not be set") {
67
+ @include should(expect($flint-foundation),
68
+ to(be(false))
69
+ );
70
+ }
71
+
72
+ @include _("foundation");
73
+
74
+ @include it("should expect foundation to be set") {
75
+ @include should(expect($flint-foundation),
76
+ to(be(true))
77
+ );
78
+ }
79
+
80
+ @import "functions/functions";
81
+
82
+ ///
83
+ /// END TESTS
84
+ /// ---------
85
+ ///
86
+ @include runner-end;
87
+ ///
88
+ /// ---------
89
+ /// END TESTS
90
+ ///
91
+
92
+
93
+
94
+ ///
95
+ /// Visual HTML test
96
+ ///
97
+ $color__blue: #2C3F52;
98
+ $color__blue--dark: #15202A;
99
+ $color__blue--darkest: #0E181E;
100
+ $color__yellow: #FFF87B;
101
+
102
+ // Pseudo content
103
+ @mixin col-num($i) {
104
+ &:before {
105
+ @include _(desktop) {
106
+ content: "#{$i} of 16";
107
+ }
108
+ @include _(laptop) {
109
+ @if $i > 12 { $i: 12; }
110
+ content: "#{$i} of 12";
111
+ }
112
+ @include _(tablet) {
113
+ @if $i > 8 { $i: 8; }
114
+ content: "#{$i} of 8";
115
+ }
116
+ @include _(mobile) {
117
+ @if $i > 4 { $i: 4; }
118
+ content: "#{$i} of 4";
119
+ }
120
+ }
121
+ }
122
+
123
+ // Generate cols
124
+ @for $i from 1 through 16 {
125
+ .col-#{$i} {
126
+
127
+ @if $i == 16 {
128
+
129
+ @include _($i 12 8 4);
130
+ @include col-num($i);
131
+
132
+ .col-#{$i}-child {
133
+ @include _($i/2 12/2 8/2 4/2, auto);
134
+ @include col-num($i/2);
135
+
136
+ .col-#{$i}-grandchild {
137
+ @include _($i/4 12/4 8/4 4/4, auto);
138
+ @include col-num($i/4);
139
+ }
140
+ }
141
+
142
+ } @else if $i > 12 {
143
+
144
+ @include _($i 12 8 4);
145
+ @include col-num($i);
146
+
147
+ .col-#{$i}-child {
148
+ @include _($i/2 12/2 8/2 4/2, auto);
149
+ @include col-num($i/2);
150
+ }
151
+
152
+ } @else if $i > 8 {
153
+
154
+ @include _($i $i 8 4);
155
+ @include col-num($i);
156
+
157
+ .col-#{$i}-child {
158
+ @include _($i/2 $i/2 8/2 4/2, auto);
159
+ @include col-num($i/2);
160
+ }
161
+
162
+ } @else if $i > 4 {
163
+
164
+ @include _($i $i $i 4);
165
+ @include col-num($i);
166
+
167
+ .col-#{$i}-child {
168
+ @include _($i/2 $i/2 $i/2 4/2, auto);
169
+ @include col-num($i/2);
170
+ }
171
+
172
+ } @else {
173
+
174
+ @include _($i);
175
+ @include col-num($i);
176
+
177
+ .col-#{$i}-child {
178
+ @include _($i, auto);
179
+ @include col-num($i);
180
+ }
181
+
182
+ }
183
+
184
+ // background: if($i > 10, darken($color__blue, ($i*0.25)), lighten($color__blue, (16/$i)));
185
+ clear: both;
186
+
187
+ div {
188
+ // background: if($i > 10, lighten($color__blue, ($i*0.25)), darken($color__blue, (16/$i)));
189
+ height: 100% !important;
190
+
191
+ div {
192
+ // background: if($i > 10, darken($color__blue, ($i*0.25)), lighten($color__blue, (16/$i)));
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ .col-third {
199
+ @include _(16/3 12/3 8/3 4/3);
200
+ // background: $color__blue;
201
+
202
+ &:before { content: "1/3"; }
203
+ }
204
+
205
+ .col-fourth {
206
+ @include _(16/4 12/4 8/4 4/4);
207
+ // background: $color__blue;
208
+
209
+ &:before { content: "1/4"; }
210
+ }
211
+
212
+ .col-fifth {
213
+ @include _(16/5 12/5 8/5 4/5);
214
+ // background: $color__blue;
215
+
216
+ &:before { content: "1/5"; }
217
+
218
+ .col-fifth-child {
219
+ @include _((16/5)/3 (12/5)/3 (8/5)/3 (4/5)/3, auto);
220
+ height: 100% !important;
221
+ }
222
+ }
223
+
224
+ div[class*="col"] {
225
+ position: relative;
226
+ font: 10px Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
227
+ color: $color__yellow;
228
+ height: 120px;
229
+ margin-top: 10px;
230
+ margin-bottom: 10px;
231
+ padding: 2em 0;
232
+ outline: lighten($color__blue, 10%) solid 2px;
233
+
234
+ &:before {
235
+ position: absolute;
236
+ top: 1em;
237
+ left: 1em;
238
+ }
239
+ }
240
+
241
+ section {
242
+ background: $color__blue--darkest;
243
+ // & + & { background: darken($color__blue--darkest, 5%); }
244
+ // & + & + & { background: darken($color__blue--darkest, 10%); }
245
+ // & + & + & + & { background: darken($color__blue--darkest, 15%); }
246
+ }
247
+
248
+ .container {
249
+ @include _(container, clear);
250
+ }