bourbon 5.0.0.beta.6 → 5.0.0.beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE.md +11 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
- data/CHANGELOG.md +32 -1
- data/README.md +111 -44
- data/RELEASING.md +3 -2
- data/bourbon.gemspec +3 -5
- data/bower.json +2 -2
- data/core/_bourbon.scss +8 -6
- data/core/bourbon/library/_border-color.scss +8 -7
- data/core/bourbon/library/_border-radius.scss +12 -12
- data/core/bourbon/library/_border-style.scss +8 -7
- data/core/bourbon/library/_border-width.scss +8 -7
- data/core/bourbon/library/_buttons.scss +4 -4
- data/core/bourbon/library/_clearfix.scss +2 -2
- data/core/bourbon/library/_contrast-switch.scss +36 -14
- data/core/bourbon/library/_ellipsis.scss +1 -1
- data/core/bourbon/library/_font-face.scss +5 -4
- data/core/bourbon/library/_font-stacks.scss +170 -8
- data/core/bourbon/library/_hide-text.scss +2 -2
- data/core/bourbon/library/_hide-visually.scss +4 -2
- data/core/bourbon/library/_margin.scss +17 -14
- data/core/bourbon/library/_modular-scale.scss +28 -20
- data/core/bourbon/library/_overflow-wrap.scss +24 -0
- data/core/bourbon/library/_padding.scss +12 -10
- data/core/bourbon/library/_position.scss +30 -20
- data/core/bourbon/library/_prefixer.scss +1 -1
- data/core/bourbon/library/_shade.scss +1 -1
- data/core/bourbon/library/_size.scss +7 -5
- data/core/bourbon/library/_strip-unit.scss +1 -1
- data/core/bourbon/library/_text-inputs.scss +5 -5
- data/core/bourbon/library/_timing-functions.scss +1 -1
- data/core/bourbon/library/_tint.scss +1 -1
- data/core/bourbon/library/_triangle.scss +1 -1
- data/core/bourbon/library/_value-prefixer.scss +1 -1
- data/core/bourbon/settings/_settings.scss +28 -4
- data/core/bourbon/utilities/{_collapse-directionals.scss → _compact-shorthand.scss} +6 -18
- data/core/bourbon/utilities/_contrast-ratio.scss +31 -0
- data/core/bourbon/utilities/_directional-property.scss +71 -0
- data/core/bourbon/utilities/_font-source-declaration.scss +1 -1
- data/core/bourbon/utilities/_gamma.scss +21 -0
- data/core/bourbon/utilities/_lightness.scss +24 -0
- data/core/bourbon/utilities/{_unpack.scss → _unpack-shorthand.scss} +4 -4
- data/core/bourbon/validators/_contains-falsy.scss +1 -1
- data/lib/bourbon/version.rb +1 -1
- data/package.json +2 -2
- data/spec/bourbon/library/font_stacks_spec.rb +6 -4
- data/spec/bourbon/library/hide_visually_spec.rb +2 -0
- data/spec/bourbon/library/overflow_wrap_spec.rb +27 -0
- data/spec/bourbon/utilities/compact_shorthand_spec.rb +30 -0
- data/spec/bourbon/utilities/{directional_values_spec.rb → directional_property_spec.rb} +9 -2
- data/spec/fixtures/library/overflow-wrap.scss +9 -0
- data/spec/fixtures/library/position.scss +0 -4
- data/spec/fixtures/utilities/compact-shorthand.scss +21 -0
- data/spec/fixtures/utilities/{directional-values.scss → directional-property.scss} +4 -0
- data/spec/fixtures/utilities/unpack.scss +4 -4
- metadata +26 -28
- data/core/bourbon/library/_word-wrap.scss +0 -29
- data/core/bourbon/utilities/_directional-values.scss +0 -58
- data/core/bourbon/validators/_is-light.scss +0 -23
- data/spec/bourbon/library/word_wrap_spec.rb +0 -29
- data/spec/bourbon/utilities/collapse_directionals.rb +0 -25
- data/spec/bourbon/validators/is_light_spec.rb +0 -37
- data/spec/fixtures/library/word-wrap.scss +0 -9
- data/spec/fixtures/utilities/collapse-directionals.scss +0 -17
- data/spec/fixtures/validators/is-light.scss +0 -29
@@ -0,0 +1,21 @@
|
|
1
|
+
@import "setup";
|
2
|
+
|
3
|
+
.four-values-a {
|
4
|
+
padding: _compact-shorthand(10px 20px 30px 40px);
|
5
|
+
}
|
6
|
+
|
7
|
+
.four-values-b {
|
8
|
+
padding: _compact-shorthand(5px 10px 5px 20px);
|
9
|
+
}
|
10
|
+
|
11
|
+
.two-values {
|
12
|
+
padding: _compact-shorthand(50px 100px 50px 100px);
|
13
|
+
}
|
14
|
+
|
15
|
+
.one-value {
|
16
|
+
padding: _compact-shorthand(10px 10px 10px 10px);
|
17
|
+
}
|
18
|
+
|
19
|
+
.null-value {
|
20
|
+
padding: _compact-shorthand(10px null 20px);
|
21
|
+
}
|
@@ -1,17 +1,17 @@
|
|
1
1
|
@import "setup";
|
2
2
|
|
3
3
|
.single {
|
4
|
-
padding: _unpack(10px);
|
4
|
+
padding: _unpack-shorthand(10px);
|
5
5
|
}
|
6
6
|
|
7
7
|
.double {
|
8
|
-
padding: _unpack(1em 2em);
|
8
|
+
padding: _unpack-shorthand(1em 2em);
|
9
9
|
}
|
10
10
|
|
11
11
|
.triple {
|
12
|
-
padding: _unpack(10px 20px 0);
|
12
|
+
padding: _unpack-shorthand(10px 20px 0);
|
13
13
|
}
|
14
14
|
|
15
15
|
.quadruple {
|
16
|
-
padding: _unpack(0 calc(1em + 10px) 20px 50px);
|
16
|
+
padding: _unpack-shorthand(0 calc(1em + 10px) 20px 50px);
|
17
17
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bourbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0.beta.
|
4
|
+
version: 5.0.0.beta.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Reuter
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
|
-
date: 2016-
|
20
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: aruba
|
@@ -118,16 +118,16 @@ dependencies:
|
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: 0.19.1
|
120
120
|
description: |2
|
121
|
-
Bourbon is a library of pure Sass mixins that are designed to
|
122
|
-
|
123
|
-
vanilla as possible, meaning they should be as close to the original
|
124
|
-
CSS syntax as possible.
|
121
|
+
Bourbon is a library of pure Sass mixins and functions that are designed to
|
122
|
+
make you a more efficient developer.
|
125
123
|
email: design+bourbon@thoughtbot.com
|
126
124
|
executables:
|
127
125
|
- bourbon
|
128
126
|
extensions: []
|
129
127
|
extra_rdoc_files: []
|
130
128
|
files:
|
129
|
+
- ".github/ISSUE_TEMPLATE.md"
|
130
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
131
131
|
- ".gitignore"
|
132
132
|
- ".hound.yml"
|
133
133
|
- ".npmignore"
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- core/bourbon/library/_hide-visually.scss
|
163
163
|
- core/bourbon/library/_margin.scss
|
164
164
|
- core/bourbon/library/_modular-scale.scss
|
165
|
+
- core/bourbon/library/_overflow-wrap.scss
|
165
166
|
- core/bourbon/library/_padding.scss
|
166
167
|
- core/bourbon/library/_position.scss
|
167
168
|
- core/bourbon/library/_prefixer.scss
|
@@ -173,19 +174,20 @@ files:
|
|
173
174
|
- core/bourbon/library/_tint.scss
|
174
175
|
- core/bourbon/library/_triangle.scss
|
175
176
|
- core/bourbon/library/_value-prefixer.scss
|
176
|
-
- core/bourbon/library/_word-wrap.scss
|
177
177
|
- core/bourbon/settings/_settings.scss
|
178
178
|
- core/bourbon/utilities/_assign-inputs.scss
|
179
|
-
- core/bourbon/utilities/
|
180
|
-
- core/bourbon/utilities/
|
179
|
+
- core/bourbon/utilities/_compact-shorthand.scss
|
180
|
+
- core/bourbon/utilities/_contrast-ratio.scss
|
181
|
+
- core/bourbon/utilities/_directional-property.scss
|
181
182
|
- core/bourbon/utilities/_font-source-declaration.scss
|
183
|
+
- core/bourbon/utilities/_gamma.scss
|
184
|
+
- core/bourbon/utilities/_lightness.scss
|
182
185
|
- core/bourbon/utilities/_retrieve-bourbon-setting.scss
|
183
|
-
- core/bourbon/utilities/_unpack.scss
|
186
|
+
- core/bourbon/utilities/_unpack-shorthand.scss
|
184
187
|
- core/bourbon/validators/_contains-falsy.scss
|
185
188
|
- core/bourbon/validators/_contains.scss
|
186
189
|
- core/bourbon/validators/_is-color.scss
|
187
190
|
- core/bourbon/validators/_is-length.scss
|
188
|
-
- core/bourbon/validators/_is-light.scss
|
189
191
|
- core/bourbon/validators/_is-number.scss
|
190
192
|
- core/bourbon/validators/_is-size.scss
|
191
193
|
- eyeglass-exports.js
|
@@ -217,6 +219,7 @@ files:
|
|
217
219
|
- spec/bourbon/library/hide_visually_spec.rb
|
218
220
|
- spec/bourbon/library/margin_spec.rb
|
219
221
|
- spec/bourbon/library/modular_scale_spec.rb
|
222
|
+
- spec/bourbon/library/overflow_wrap_spec.rb
|
220
223
|
- spec/bourbon/library/padding_spec.rb
|
221
224
|
- spec/bourbon/library/position_spec.rb
|
222
225
|
- spec/bourbon/library/prefixer_spec.rb
|
@@ -226,16 +229,14 @@ files:
|
|
226
229
|
- spec/bourbon/library/text_inputs_spec.rb
|
227
230
|
- spec/bourbon/library/tint_spec.rb
|
228
231
|
- spec/bourbon/library/triangle_spec.rb
|
229
|
-
- spec/bourbon/library/word_wrap_spec.rb
|
230
232
|
- spec/bourbon/utilities/assign_inputs_spec.rb
|
231
|
-
- spec/bourbon/utilities/
|
232
|
-
- spec/bourbon/utilities/
|
233
|
+
- spec/bourbon/utilities/compact_shorthand_spec.rb
|
234
|
+
- spec/bourbon/utilities/directional_property_spec.rb
|
233
235
|
- spec/bourbon/utilities/font_source_declaration_spec.rb
|
234
236
|
- spec/bourbon/utilities/retrieve_bourbon_setting_spec.rb
|
235
237
|
- spec/bourbon/utilities/unpack_spec.rb
|
236
238
|
- spec/bourbon/validators/contains_spec.rb
|
237
239
|
- spec/bourbon/validators/is_length_spec.rb
|
238
|
-
- spec/bourbon/validators/is_light_spec.rb
|
239
240
|
- spec/bourbon/validators/is_number_spec.rb
|
240
241
|
- spec/bourbon/validators/is_size_spec.rb
|
241
242
|
- spec/fixtures/_setup.scss
|
@@ -256,6 +257,7 @@ files:
|
|
256
257
|
- spec/fixtures/library/hide-visually.scss
|
257
258
|
- spec/fixtures/library/margin.scss
|
258
259
|
- spec/fixtures/library/modular-scale.scss
|
260
|
+
- spec/fixtures/library/overflow-wrap.scss
|
259
261
|
- spec/fixtures/library/padding.scss
|
260
262
|
- spec/fixtures/library/position.scss
|
261
263
|
- spec/fixtures/library/prefixer.scss
|
@@ -265,16 +267,14 @@ files:
|
|
265
267
|
- spec/fixtures/library/text-inputs.scss
|
266
268
|
- spec/fixtures/library/tint.scss
|
267
269
|
- spec/fixtures/library/triangle.scss
|
268
|
-
- spec/fixtures/library/word-wrap.scss
|
269
270
|
- spec/fixtures/utilities/assign-inputs.scss
|
270
|
-
- spec/fixtures/utilities/
|
271
|
-
- spec/fixtures/utilities/directional-
|
271
|
+
- spec/fixtures/utilities/compact-shorthand.scss
|
272
|
+
- spec/fixtures/utilities/directional-property.scss
|
272
273
|
- spec/fixtures/utilities/font-source-declaration.scss
|
273
274
|
- spec/fixtures/utilities/retrieve-bourbon-setting.scss
|
274
275
|
- spec/fixtures/utilities/unpack.scss
|
275
276
|
- spec/fixtures/validators/contains.scss
|
276
277
|
- spec/fixtures/validators/is-length.scss
|
277
|
-
- spec/fixtures/validators/is-light.scss
|
278
278
|
- spec/fixtures/validators/is-number.scss
|
279
279
|
- spec/fixtures/validators/is-size.scss
|
280
280
|
- spec/spec_helper.rb
|
@@ -306,7 +306,7 @@ rubyforge_project:
|
|
306
306
|
rubygems_version: 2.5.2
|
307
307
|
signing_key:
|
308
308
|
specification_version: 4
|
309
|
-
summary: A
|
309
|
+
summary: A lightweight Sass tool set.
|
310
310
|
test_files:
|
311
311
|
- features/install.feature
|
312
312
|
- features/step_definitions/bourbon_steps.rb
|
@@ -331,6 +331,7 @@ test_files:
|
|
331
331
|
- spec/bourbon/library/hide_visually_spec.rb
|
332
332
|
- spec/bourbon/library/margin_spec.rb
|
333
333
|
- spec/bourbon/library/modular_scale_spec.rb
|
334
|
+
- spec/bourbon/library/overflow_wrap_spec.rb
|
334
335
|
- spec/bourbon/library/padding_spec.rb
|
335
336
|
- spec/bourbon/library/position_spec.rb
|
336
337
|
- spec/bourbon/library/prefixer_spec.rb
|
@@ -340,16 +341,14 @@ test_files:
|
|
340
341
|
- spec/bourbon/library/text_inputs_spec.rb
|
341
342
|
- spec/bourbon/library/tint_spec.rb
|
342
343
|
- spec/bourbon/library/triangle_spec.rb
|
343
|
-
- spec/bourbon/library/word_wrap_spec.rb
|
344
344
|
- spec/bourbon/utilities/assign_inputs_spec.rb
|
345
|
-
- spec/bourbon/utilities/
|
346
|
-
- spec/bourbon/utilities/
|
345
|
+
- spec/bourbon/utilities/compact_shorthand_spec.rb
|
346
|
+
- spec/bourbon/utilities/directional_property_spec.rb
|
347
347
|
- spec/bourbon/utilities/font_source_declaration_spec.rb
|
348
348
|
- spec/bourbon/utilities/retrieve_bourbon_setting_spec.rb
|
349
349
|
- spec/bourbon/utilities/unpack_spec.rb
|
350
350
|
- spec/bourbon/validators/contains_spec.rb
|
351
351
|
- spec/bourbon/validators/is_length_spec.rb
|
352
|
-
- spec/bourbon/validators/is_light_spec.rb
|
353
352
|
- spec/bourbon/validators/is_number_spec.rb
|
354
353
|
- spec/bourbon/validators/is_size_spec.rb
|
355
354
|
- spec/fixtures/_setup.scss
|
@@ -370,6 +369,7 @@ test_files:
|
|
370
369
|
- spec/fixtures/library/hide-visually.scss
|
371
370
|
- spec/fixtures/library/margin.scss
|
372
371
|
- spec/fixtures/library/modular-scale.scss
|
372
|
+
- spec/fixtures/library/overflow-wrap.scss
|
373
373
|
- spec/fixtures/library/padding.scss
|
374
374
|
- spec/fixtures/library/position.scss
|
375
375
|
- spec/fixtures/library/prefixer.scss
|
@@ -379,16 +379,14 @@ test_files:
|
|
379
379
|
- spec/fixtures/library/text-inputs.scss
|
380
380
|
- spec/fixtures/library/tint.scss
|
381
381
|
- spec/fixtures/library/triangle.scss
|
382
|
-
- spec/fixtures/library/word-wrap.scss
|
383
382
|
- spec/fixtures/utilities/assign-inputs.scss
|
384
|
-
- spec/fixtures/utilities/
|
385
|
-
- spec/fixtures/utilities/directional-
|
383
|
+
- spec/fixtures/utilities/compact-shorthand.scss
|
384
|
+
- spec/fixtures/utilities/directional-property.scss
|
386
385
|
- spec/fixtures/utilities/font-source-declaration.scss
|
387
386
|
- spec/fixtures/utilities/retrieve-bourbon-setting.scss
|
388
387
|
- spec/fixtures/utilities/unpack.scss
|
389
388
|
- spec/fixtures/validators/contains.scss
|
390
389
|
- spec/fixtures/validators/is-length.scss
|
391
|
-
- spec/fixtures/validators/is-light.scss
|
392
390
|
- spec/fixtures/validators/is-number.scss
|
393
391
|
- spec/fixtures/validators/is-size.scss
|
394
392
|
- spec/spec_helper.rb
|
@@ -1,29 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Provides an easy way to change the `word-wrap` property.
|
4
|
-
///
|
5
|
-
/// @argument {string} $wrap [break-word]
|
6
|
-
/// Value for the `word-break` property.
|
7
|
-
///
|
8
|
-
/// @example scss
|
9
|
-
/// .wrapper {
|
10
|
-
/// @include word-wrap(break-word);
|
11
|
-
/// }
|
12
|
-
///
|
13
|
-
/// @example css
|
14
|
-
/// .wrapper {
|
15
|
-
/// overflow-wrap: break-word;
|
16
|
-
/// word-break: break-all;
|
17
|
-
/// word-wrap: break-word;
|
18
|
-
/// }
|
19
|
-
|
20
|
-
@mixin word-wrap($wrap: break-word) {
|
21
|
-
overflow-wrap: $wrap;
|
22
|
-
word-wrap: $wrap;
|
23
|
-
|
24
|
-
@if $wrap == break-word {
|
25
|
-
word-break: break-all;
|
26
|
-
} @else {
|
27
|
-
word-break: $wrap;
|
28
|
-
}
|
29
|
-
}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
// scss-lint:disable SpaceAroundOperator
|
4
|
-
|
5
|
-
/// Output directional properties, for instance `margin`.
|
6
|
-
///
|
7
|
-
/// @argument {string} $pre
|
8
|
-
/// Prefix to use.
|
9
|
-
///
|
10
|
-
/// @argument {string} $suf
|
11
|
-
/// Suffix to use.
|
12
|
-
///
|
13
|
-
/// @argument {list} $values
|
14
|
-
/// List of values.
|
15
|
-
///
|
16
|
-
/// @require {function} _collapse-directionals
|
17
|
-
///
|
18
|
-
/// @require {function} _contains-falsy
|
19
|
-
///
|
20
|
-
/// @access private
|
21
|
-
|
22
|
-
@mixin _directional-property(
|
23
|
-
$pre,
|
24
|
-
$suf,
|
25
|
-
$values
|
26
|
-
) {
|
27
|
-
|
28
|
-
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
|
29
|
-
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
|
30
|
-
$left: $pre + "-left" + if($suf, "-#{$suf}", "");
|
31
|
-
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
|
32
|
-
$all: $pre + if($suf, "-#{$suf}", "");
|
33
|
-
|
34
|
-
$values: _collapse-directionals($values);
|
35
|
-
|
36
|
-
@if _contains-falsy($values) {
|
37
|
-
@if nth($values, 1) { #{$top}: nth($values, 1); }
|
38
|
-
|
39
|
-
@if length($values) == 1 {
|
40
|
-
@if nth($values, 1) { #{$right}: nth($values, 1); }
|
41
|
-
} @else {
|
42
|
-
@if nth($values, 2) { #{$right}: nth($values, 2); }
|
43
|
-
}
|
44
|
-
|
45
|
-
@if length($values) == 2 {
|
46
|
-
@if nth($values, 1) { #{$bottom}: nth($values, 1); }
|
47
|
-
@if nth($values, 2) { #{$left}: nth($values, 2); }
|
48
|
-
} @else if length($values) == 3 {
|
49
|
-
@if nth($values, 3) { #{$bottom}: nth($values, 3); }
|
50
|
-
@if nth($values, 2) { #{$left}: nth($values, 2); }
|
51
|
-
} @else if length($values) == 4 {
|
52
|
-
@if nth($values, 3) { #{$bottom}: nth($values, 3); }
|
53
|
-
@if nth($values, 4) { #{$left}: nth($values, 4); }
|
54
|
-
}
|
55
|
-
} @else {
|
56
|
-
#{$all}: $values;
|
57
|
-
}
|
58
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Programatically determines whether a color is light or dark.
|
4
|
-
///
|
5
|
-
/// @link http://goo.gl/Dil4Y9
|
6
|
-
///
|
7
|
-
/// @argument {color (hex)} $hex-color
|
8
|
-
///
|
9
|
-
/// @return {boolean}
|
10
|
-
///
|
11
|
-
/// @example scss
|
12
|
-
/// is-light($color)
|
13
|
-
///
|
14
|
-
/// @access private
|
15
|
-
|
16
|
-
@function _is-light($hex-color) {
|
17
|
-
$-local-red: red(rgba($hex-color, 1));
|
18
|
-
$-local-green: green(rgba($hex-color, 1));
|
19
|
-
$-local-blue: blue(rgba($hex-color, 1));
|
20
|
-
$-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255;
|
21
|
-
|
22
|
-
@return $-local-lightness > 0.6;
|
23
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "word-wrap" do
|
4
|
-
before(:all) do
|
5
|
-
ParserSupport.parse_file("library/word-wrap")
|
6
|
-
end
|
7
|
-
|
8
|
-
context "called on element" do
|
9
|
-
it "adds word-wrap" do
|
10
|
-
input = ".word-wrap"
|
11
|
-
ruleset = "overflow-wrap: break-word; " +
|
12
|
-
"word-wrap: break-word; " +
|
13
|
-
"word-break: break-all;"
|
14
|
-
|
15
|
-
expect(input).to have_ruleset(ruleset)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
context "called on element with break" do
|
20
|
-
it "adds break" do
|
21
|
-
input = ".word-wrap-break"
|
22
|
-
ruleset = "overflow-wrap: normal; " +
|
23
|
-
"word-wrap: normal; " +
|
24
|
-
"word-break: normal;"
|
25
|
-
|
26
|
-
expect(input).to have_ruleset(ruleset)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "collapse-directionals" do
|
4
|
-
before(:all) do
|
5
|
-
ParserSupport.parse_file("utilities/collapse-directionals")
|
6
|
-
end
|
7
|
-
|
8
|
-
context "collapse-directionals" do
|
9
|
-
it "returns four distinct lengths unaltered" do
|
10
|
-
expect(".four").to have_rule("padding: 10px 20px 30px 40px")
|
11
|
-
end
|
12
|
-
|
13
|
-
it "returns collapsed horizontal lengths" do
|
14
|
-
expect(".three").to have_rule("padding: 5px 10px 5px 20px")
|
15
|
-
end
|
16
|
-
|
17
|
-
it "returns collapsed vertical and horizontal lengths" do
|
18
|
-
expect(".two").to have_rule("padding: 50px 100px")
|
19
|
-
end
|
20
|
-
|
21
|
-
it "returns collapsed lengths when all match" do
|
22
|
-
expect(".one").to have_rule("padding: 10px")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
describe "is-light" do
|
4
|
-
before(:all) do
|
5
|
-
ParserSupport.parse_file("validators/is-light")
|
6
|
-
end
|
7
|
-
|
8
|
-
context "takes a light color" do
|
9
|
-
it "and returns true" do
|
10
|
-
expect(".pink").to have_rule("color: #000")
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
context "takes a medium-light color" do
|
15
|
-
it "and returns true" do
|
16
|
-
expect(".sky").to have_rule("color: #000")
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
context "takes a medium-dark color" do
|
21
|
-
it "and returns false" do
|
22
|
-
expect(".medium-gray").to have_rule("color: #fff")
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
context "takes a dark color" do
|
27
|
-
it "and returns false" do
|
28
|
-
expect(".charcoal").to have_rule("color: #fff")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
context "takes a translucent color" do
|
33
|
-
it "and processes as an opaque color" do
|
34
|
-
expect(".translucent").to have_rule("color: #000")
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|