bourbon 4.3.4 → 5.0.0.alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.npmignore +1 -0
- data/.scss-lint.yml +2 -143
- data/.travis.yml +8 -0
- data/LICENSE.md +1 -1
- data/README.md +5 -19
- data/bourbon.gemspec +2 -2
- data/bower.json +7 -6
- data/core/_bourbon.scss +47 -0
- data/core/bourbon/_bourbon-deprecated.scss +1 -0
- data/core/bourbon/addons/_border-color.scss +26 -0
- data/{app/assets/stylesheets → core/bourbon}/addons/_border-radius.scss +19 -18
- data/core/bourbon/addons/_border-style.scss +25 -0
- data/core/bourbon/addons/_border-width.scss +25 -0
- data/core/bourbon/addons/_buttons.scss +61 -0
- data/core/bourbon/addons/_clearfix.scss +25 -0
- data/core/bourbon/addons/_ellipsis.scss +30 -0
- data/core/bourbon/addons/_font-stacks.scss +19 -0
- data/core/bourbon/addons/_hide-text.scss +23 -0
- data/core/bourbon/addons/_margin.scss +26 -0
- data/core/bourbon/addons/_padding.scss +26 -0
- data/core/bourbon/addons/_position.scss +49 -0
- data/core/bourbon/addons/_prefixer.scss +33 -0
- data/core/bourbon/addons/_size.scss +43 -0
- data/core/bourbon/addons/_text-inputs.scss +123 -0
- data/{app/assets/stylesheets → core/bourbon}/addons/_timing-functions.scss +7 -3
- data/core/bourbon/addons/_word-wrap.scss +29 -0
- data/core/bourbon/css3/_font-face.scss +50 -0
- data/core/bourbon/functions/_assign-inputs.scss +25 -0
- data/core/bourbon/functions/_contains-falsy.scss +20 -0
- data/core/bourbon/functions/_contains.scss +23 -0
- data/{app/assets/stylesheets → core/bourbon}/functions/_is-length.scss +3 -6
- data/{app/assets/stylesheets → core/bourbon}/functions/_is-light.scss +5 -10
- data/{app/assets/stylesheets → core/bourbon}/functions/_is-number.scss +3 -6
- data/core/bourbon/functions/_is-size.scss +16 -0
- data/core/bourbon/functions/_modular-scale.scss +101 -0
- data/core/bourbon/functions/_shade.scss +24 -0
- data/core/bourbon/functions/_strip-unit.scss +17 -0
- data/core/bourbon/functions/_tint.scss +24 -0
- data/{app/assets/stylesheets → core/bourbon}/functions/_unpack.scss +11 -14
- data/{app/assets/stylesheets → core/bourbon}/helpers/_directional-values.scss +26 -36
- data/{app/assets/stylesheets → core/bourbon}/helpers/_font-source-declaration.scss +0 -10
- data/{app/assets/stylesheets → core/bourbon}/settings/_asset-pipeline.scss +1 -1
- data/core/bourbon/settings/_global-font-file-formats.scss +12 -0
- data/core/bourbon/settings/_modular-scale.scss +17 -0
- data/core/bourbon/settings/_scales.scss +27 -0
- data/features/step_definitions/bourbon_steps.rb +1 -1
- data/index.js +1 -1
- data/lib/bourbon/engine.rb +1 -1
- data/lib/bourbon/generator.rb +1 -1
- data/lib/bourbon/version.rb +1 -1
- data/package.json +1 -6
- data/spec/bourbon/addons/buttons_spec.rb +3 -3
- data/spec/bourbon/addons/font_stacks_spec.rb +21 -11
- data/spec/bourbon/addons/text_inputs_spec.rb +14 -14
- data/spec/bourbon/css3/font_face_spec_1.rb +18 -0
- data/spec/bourbon/css3/font_face_spec_2.rb +19 -0
- data/spec/bourbon/css3/font_face_spec_3.rb +18 -0
- data/spec/bourbon/css3/font_face_spec_4.rb +19 -0
- data/spec/bourbon/functions/assign_inputs_spec.rb +3 -3
- data/spec/bourbon/functions/{strip_units_spec.rb → strip_unit_spec.rb} +2 -2
- data/spec/fixtures/_setup.scss +1 -1
- data/spec/fixtures/addons/font-stacks.scss +24 -8
- data/spec/fixtures/addons/size.scss +2 -2
- data/spec/fixtures/css3/font-face-1.scss +3 -0
- data/spec/fixtures/css3/font-face-2.scss +3 -0
- data/spec/fixtures/css3/font-face-3.scss +3 -0
- data/spec/fixtures/css3/font-face-4.scss +3 -0
- data/spec/fixtures/functions/assign-inputs.scss +1 -1
- data/spec/fixtures/functions/strip-unit.scss +17 -0
- metadata +72 -129
- data/CHANGELOG.md +0 -47
- data/app/assets/stylesheets/_bourbon-deprecate.scss +0 -19
- data/app/assets/stylesheets/_bourbon-deprecated-upcoming.scss +0 -425
- data/app/assets/stylesheets/_bourbon.scss +0 -90
- data/app/assets/stylesheets/addons/_border-color.scss +0 -29
- data/app/assets/stylesheets/addons/_border-style.scss +0 -28
- data/app/assets/stylesheets/addons/_border-width.scss +0 -28
- data/app/assets/stylesheets/addons/_buttons.scss +0 -69
- data/app/assets/stylesheets/addons/_clearfix.scss +0 -25
- data/app/assets/stylesheets/addons/_ellipsis.scss +0 -30
- data/app/assets/stylesheets/addons/_font-stacks.scss +0 -31
- data/app/assets/stylesheets/addons/_hide-text.scss +0 -27
- data/app/assets/stylesheets/addons/_margin.scss +0 -29
- data/app/assets/stylesheets/addons/_padding.scss +0 -29
- data/app/assets/stylesheets/addons/_position.scss +0 -51
- data/app/assets/stylesheets/addons/_prefixer.scss +0 -66
- data/app/assets/stylesheets/addons/_retina-image.scss +0 -27
- data/app/assets/stylesheets/addons/_size.scss +0 -56
- data/app/assets/stylesheets/addons/_text-inputs.scss +0 -118
- data/app/assets/stylesheets/addons/_triangle.scss +0 -63
- data/app/assets/stylesheets/addons/_word-wrap.scss +0 -29
- data/app/assets/stylesheets/css3/_animation.scss +0 -61
- data/app/assets/stylesheets/css3/_appearance.scss +0 -5
- data/app/assets/stylesheets/css3/_backface-visibility.scss +0 -5
- data/app/assets/stylesheets/css3/_background-image.scss +0 -44
- data/app/assets/stylesheets/css3/_background.scss +0 -57
- data/app/assets/stylesheets/css3/_border-image.scss +0 -61
- data/app/assets/stylesheets/css3/_calc.scss +0 -6
- data/app/assets/stylesheets/css3/_columns.scss +0 -67
- data/app/assets/stylesheets/css3/_filter.scss +0 -6
- data/app/assets/stylesheets/css3/_flex-box.scss +0 -327
- data/app/assets/stylesheets/css3/_font-face.scss +0 -29
- data/app/assets/stylesheets/css3/_font-feature-settings.scss +0 -6
- data/app/assets/stylesheets/css3/_hidpi-media-query.scss +0 -12
- data/app/assets/stylesheets/css3/_hyphens.scss +0 -6
- data/app/assets/stylesheets/css3/_image-rendering.scss +0 -15
- data/app/assets/stylesheets/css3/_keyframes.scss +0 -38
- data/app/assets/stylesheets/css3/_linear-gradient.scss +0 -40
- data/app/assets/stylesheets/css3/_perspective.scss +0 -12
- data/app/assets/stylesheets/css3/_placeholder.scss +0 -10
- data/app/assets/stylesheets/css3/_radial-gradient.scss +0 -40
- data/app/assets/stylesheets/css3/_selection.scss +0 -44
- data/app/assets/stylesheets/css3/_text-decoration.scss +0 -27
- data/app/assets/stylesheets/css3/_transform.scss +0 -21
- data/app/assets/stylesheets/css3/_transition.scss +0 -81
- data/app/assets/stylesheets/css3/_user-select.scss +0 -5
- data/app/assets/stylesheets/functions/_assign-inputs.scss +0 -16
- data/app/assets/stylesheets/functions/_contains-falsy.scss +0 -25
- data/app/assets/stylesheets/functions/_contains.scss +0 -31
- data/app/assets/stylesheets/functions/_is-size.scss +0 -23
- data/app/assets/stylesheets/functions/_modular-scale.scss +0 -74
- data/app/assets/stylesheets/functions/_px-to-em.scss +0 -24
- data/app/assets/stylesheets/functions/_px-to-rem.scss +0 -26
- data/app/assets/stylesheets/functions/_shade.scss +0 -24
- data/app/assets/stylesheets/functions/_strip-units.scss +0 -22
- data/app/assets/stylesheets/functions/_tint.scss +0 -24
- data/app/assets/stylesheets/functions/_transition-property-name.scss +0 -37
- data/app/assets/stylesheets/helpers/_convert-units.scss +0 -26
- data/app/assets/stylesheets/helpers/_gradient-positions-parser.scss +0 -24
- data/app/assets/stylesheets/helpers/_linear-angle-parser.scss +0 -35
- data/app/assets/stylesheets/helpers/_linear-gradient-parser.scss +0 -51
- data/app/assets/stylesheets/helpers/_linear-positions-parser.scss +0 -77
- data/app/assets/stylesheets/helpers/_linear-side-corner-parser.scss +0 -41
- data/app/assets/stylesheets/helpers/_radial-arg-parser.scss +0 -74
- data/app/assets/stylesheets/helpers/_radial-gradient-parser.scss +0 -55
- data/app/assets/stylesheets/helpers/_radial-positions-parser.scss +0 -28
- data/app/assets/stylesheets/helpers/_render-gradients.scss +0 -31
- data/app/assets/stylesheets/helpers/_shape-size-stripper.scss +0 -15
- data/app/assets/stylesheets/helpers/_str-to-num.scss +0 -55
- data/app/assets/stylesheets/settings/_deprecation-warnings.scss +0 -8
- data/app/assets/stylesheets/settings/_prefixer.scss +0 -9
- data/app/assets/stylesheets/settings/_px-to-em.scss +0 -1
- data/circle.yml +0 -10
- data/eyeglass-exports.js +0 -7
- data/sache.json +0 -5
- data/spec/bourbon/addons/retina_image_spec.rb +0 -57
- data/spec/bourbon/addons/triangle_spec.rb +0 -32
- data/spec/bourbon/css3/font_face_spec.rb +0 -45
- data/spec/bourbon/css3/hidpi_media_query_spec.rb +0 -23
- data/spec/bourbon/functions/px_to_em_spec.rb +0 -31
- data/spec/bourbon/functions/px_to_rem_spec.rb +0 -25
- data/spec/bourbon/helpers/convert_units_spec.rb +0 -31
- data/spec/bourbon/helpers/str_to_num_spec.rb +0 -25
- data/spec/fixtures/addons/retina-image.scss +0 -21
- data/spec/fixtures/addons/triangle.scss +0 -9
- data/spec/fixtures/css3/font-face.scss +0 -6
- data/spec/fixtures/css3/hidpi-media-query.scss +0 -13
- data/spec/fixtures/functions/px-to-em.scss +0 -17
- data/spec/fixtures/functions/px-to-rem.scss +0 -15
- data/spec/fixtures/functions/strip-units.scss +0 -17
- data/spec/fixtures/helpers/convert-units.scss +0 -17
- data/spec/fixtures/helpers/str-to-num.scss +0 -13
@@ -4,7 +4,9 @@
|
|
4
4
|
///
|
5
5
|
/// @ignore You can also use `false` instead of `null`.
|
6
6
|
///
|
7
|
-
/// @
|
7
|
+
/// @access private
|
8
|
+
///
|
9
|
+
/// @param {List} $values
|
8
10
|
/// List of directional values
|
9
11
|
///
|
10
12
|
/// @example scss - Usage
|
@@ -26,18 +28,13 @@
|
|
26
28
|
///
|
27
29
|
/// @return {List}
|
28
30
|
|
29
|
-
@function collapse-directionals($
|
30
|
-
@if $output-bourbon-deprecation-warnings == true {
|
31
|
-
@warn "[Bourbon] [Deprecation] `collapse-directionals` is deprecated and " +
|
32
|
-
"will be removed in 5.0.0.";
|
33
|
-
}
|
34
|
-
|
31
|
+
@function collapse-directionals($values) {
|
35
32
|
$output: null;
|
36
33
|
|
37
|
-
$a: nth($
|
38
|
-
$b: if(length($
|
39
|
-
$c: if(length($
|
40
|
-
$d: if(length($
|
34
|
+
$a: nth($values, 1);
|
35
|
+
$b: if(length($values) < 2, $a, nth($values, 2));
|
36
|
+
$c: if(length($values) < 3, $a, nth($values, 3));
|
37
|
+
$d: if(length($values) < 2, $a, nth($values, if(length($values) < 4, 2, 4)));
|
41
38
|
|
42
39
|
@if $a == 0 { $a: 0; }
|
43
40
|
@if $b == 0 { $b: 0; }
|
@@ -60,18 +57,13 @@
|
|
60
57
|
/// Prefix to use
|
61
58
|
/// @param {String} $suf
|
62
59
|
/// Suffix to use
|
63
|
-
/// @param {List} $
|
60
|
+
/// @param {List} $values
|
64
61
|
/// List of values
|
65
62
|
///
|
66
63
|
/// @require {function} collapse-directionals
|
67
64
|
/// @require {function} contains-falsy
|
68
65
|
|
69
|
-
@mixin directional-property($pre, $suf, $
|
70
|
-
@include _bourbon-deprecate("directional-property");
|
71
|
-
|
72
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
73
|
-
$output-bourbon-deprecation-warnings: false !global;
|
74
|
-
|
66
|
+
@mixin directional-property($pre, $suf, $values) {
|
75
67
|
// Property Names
|
76
68
|
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
|
77
69
|
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
|
@@ -79,30 +71,28 @@
|
|
79
71
|
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
|
80
72
|
$all: $pre + if($suf, "-#{$suf}", "");
|
81
73
|
|
82
|
-
$
|
74
|
+
$values: collapse-directionals($values);
|
83
75
|
|
84
|
-
@if contains-falsy($
|
85
|
-
@if nth($
|
76
|
+
@if contains-falsy($values) {
|
77
|
+
@if nth($values, 1) { #{$top}: nth($values, 1); }
|
86
78
|
|
87
|
-
@if length($
|
88
|
-
@if nth($
|
79
|
+
@if length($values) == 1 {
|
80
|
+
@if nth($values, 1) { #{$right}: nth($values, 1); }
|
89
81
|
} @else {
|
90
|
-
@if nth($
|
82
|
+
@if nth($values, 2) { #{$right}: nth($values, 2); }
|
91
83
|
}
|
92
84
|
|
93
|
-
@if length($
|
94
|
-
@if nth($
|
95
|
-
@if nth($
|
96
|
-
} @else if length($
|
97
|
-
@if nth($
|
98
|
-
@if nth($
|
99
|
-
} @else if length($
|
100
|
-
@if nth($
|
101
|
-
@if nth($
|
85
|
+
@if length($values) == 2 {
|
86
|
+
@if nth($values, 1) { #{$bottom}: nth($values, 1); }
|
87
|
+
@if nth($values, 2) { #{$left}: nth($values, 2); }
|
88
|
+
} @else if length($values) == 3 {
|
89
|
+
@if nth($values, 3) { #{$bottom}: nth($values, 3); }
|
90
|
+
@if nth($values, 2) { #{$left}: nth($values, 2); }
|
91
|
+
} @else if length($values) == 4 {
|
92
|
+
@if nth($values, 3) { #{$bottom}: nth($values, 3); }
|
93
|
+
@if nth($values, 4) { #{$left}: nth($values, 4); }
|
102
94
|
}
|
103
95
|
} @else {
|
104
|
-
#{$all}: $
|
96
|
+
#{$all}: $values;
|
105
97
|
}
|
106
|
-
|
107
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
108
98
|
}
|
@@ -2,11 +2,6 @@
|
|
2
2
|
// Reference: http://goo.gl/Ru1bKP
|
3
3
|
|
4
4
|
@function font-url-prefixer($asset-pipeline) {
|
5
|
-
@if $output-bourbon-deprecation-warnings == true {
|
6
|
-
@warn "[Bourbon] [Deprecation] `font-url-prefixer` is deprecated and " +
|
7
|
-
"will be removed in 5.0.0.";
|
8
|
-
}
|
9
|
-
|
10
5
|
@if $asset-pipeline == true {
|
11
6
|
@return font-url;
|
12
7
|
} @else {
|
@@ -21,11 +16,6 @@
|
|
21
16
|
$file-formats,
|
22
17
|
$font-url) {
|
23
18
|
|
24
|
-
@if $output-bourbon-deprecation-warnings == true {
|
25
|
-
@warn "[Bourbon] [Deprecation] `font-source-declaration` is deprecated " +
|
26
|
-
"and will be removed in 5.0.0.";
|
27
|
-
}
|
28
|
-
|
29
19
|
$src: ();
|
30
20
|
|
31
21
|
$formats-map: (
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// A global setting for font file formats for the `font-face` mixin.
|
4
|
+
///
|
5
|
+
/// @see {mixin} font-face
|
6
|
+
///
|
7
|
+
/// @example scss
|
8
|
+
/// $global-font-file-formats: woff2 woff;
|
9
|
+
///
|
10
|
+
/// @type list | string
|
11
|
+
|
12
|
+
$global-font-file-formats: ttf woff2 woff !default;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
/// Global setting for the modular scale ratio
|
4
|
+
///
|
5
|
+
/// @see {function} modular-scale
|
6
|
+
///
|
7
|
+
/// @type number
|
8
|
+
|
9
|
+
$modular-scale-ratio: $perfect-fourth !default;
|
10
|
+
|
11
|
+
/// Global setting for the modular scale base value
|
12
|
+
///
|
13
|
+
/// @see {function} modular-scale
|
14
|
+
///
|
15
|
+
/// @type number
|
16
|
+
|
17
|
+
$modular-scale-base: 1em !default;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@charset "UTF-8";
|
2
|
+
|
3
|
+
////
|
4
|
+
/// Pre-defined scales for use with the `modular-scale` function
|
5
|
+
///
|
6
|
+
/// @see {function} modular-scale
|
7
|
+
///
|
8
|
+
/// @type number
|
9
|
+
////
|
10
|
+
|
11
|
+
$minor-second: 1.067;
|
12
|
+
$major-second: 1.125;
|
13
|
+
$minor-third: 1.2;
|
14
|
+
$major-third: 1.25;
|
15
|
+
$perfect-fourth: 1.333;
|
16
|
+
$augmented-fourth: 1.414;
|
17
|
+
$perfect-fifth: 1.5;
|
18
|
+
$minor-sixth: 1.6;
|
19
|
+
$golden: 1.618;
|
20
|
+
$major-sixth: 1.667;
|
21
|
+
$minor-seventh: 1.778;
|
22
|
+
$major-seventh: 1.875;
|
23
|
+
$octave: 2;
|
24
|
+
$major-tenth: 2.5;
|
25
|
+
$major-eleventh: 2.667;
|
26
|
+
$major-twelfth: 3;
|
27
|
+
$double-octave: 4;
|
@@ -6,7 +6,7 @@ Given /^I install bourbon to "([^"]*)"$/ do |path|
|
|
6
6
|
end
|
7
7
|
|
8
8
|
Then /^the sass directories(?: with "([^"]+)" prefix)? should have been generated$/ do |prefix|
|
9
|
-
sass_directories = ["addons", "css3", "functions"]
|
9
|
+
sass_directories = ["bourbon/addons", "bourbon/css3", "bourbon/functions"]
|
10
10
|
sass_directories.map!{ |directory| bourbon_path(prefix, directory) }
|
11
11
|
check_directory_presence(sass_directories, true)
|
12
12
|
end
|
data/index.js
CHANGED
data/lib/bourbon/engine.rb
CHANGED
data/lib/bourbon/generator.rb
CHANGED
data/lib/bourbon/version.rb
CHANGED
data/package.json
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "bourbon",
|
3
|
-
"version": "
|
3
|
+
"version": "5.0.0.alpha.0",
|
4
4
|
"description": "A simple and lightweight mixin library for Sass.",
|
5
5
|
"keywords": [
|
6
6
|
"css",
|
7
|
-
"eyeglass-module",
|
8
7
|
"mixins",
|
9
8
|
"sass",
|
10
9
|
"scss"
|
@@ -13,10 +12,6 @@
|
|
13
12
|
"bugs": {
|
14
13
|
"url": "https://github.com/thoughtbot/bourbon/issues"
|
15
14
|
},
|
16
|
-
"eyeglass": {
|
17
|
-
"needs": "*",
|
18
|
-
"exports": "eyeglass-exports.js"
|
19
|
-
},
|
20
15
|
"license": "MIT",
|
21
16
|
"author": {
|
22
17
|
"name": "thoughtbot",
|
@@ -7,19 +7,29 @@ describe "font-stacks" do
|
|
7
7
|
|
8
8
|
context "stacks used in variable" do
|
9
9
|
it "output stacks" do
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
lucida_grande = '"Lucida Grande", "Tahoma", "Verdana", ' +
|
14
|
-
'"Arial", sans-serif'
|
15
|
-
monospace = '"Bitstream Vera Sans Mono", "Consolas", "Courier", monospace'
|
10
|
+
helvetica = '"Helvetica Neue", "Helvetica", "Arial", sans-serif'
|
11
|
+
lucida_grande = '"Lucida Grande", "Lucida Sans Unicode", ' +
|
12
|
+
'"Lucida Sans", "Geneva", "Verdana", sans-serif'
|
16
13
|
verdana = '"Verdana", "Geneva", sans-serif'
|
14
|
+
garamond = '"Garamond", "Baskerville", "Baskerville Old Face", ' +
|
15
|
+
'"Hoefler Text", "Times New Roman", serif'
|
16
|
+
georgia = '"Georgia", "Times", "Times New Roman", serif'
|
17
|
+
hoefler_text = '"Hoefler Text", "Baskerville Old Face", ' +
|
18
|
+
'"Garamond", "Times New Roman", serif'
|
19
|
+
consolas = '"Consolas", "monaco", monospace'
|
20
|
+
courier_new = '"Courier New", "Courier", "Lucida Sans Typewriter", ' +
|
21
|
+
'"Lucida Typewriter", monospace'
|
22
|
+
monaco = '"monaco", "Consolas", "Lucida Console", monospace'
|
17
23
|
|
18
|
-
expect("
|
19
|
-
expect("
|
20
|
-
expect("
|
21
|
-
expect("
|
22
|
-
expect("
|
24
|
+
expect(".helvetica").to have_value(helvetica)
|
25
|
+
expect(".lucida-grande").to have_value(lucida_grande)
|
26
|
+
expect(".verdana").to have_value(verdana)
|
27
|
+
expect(".garamond").to have_value(garamond)
|
28
|
+
expect(".georgia").to have_value(georgia)
|
29
|
+
expect(".hoefler-text").to have_value(hoefler_text)
|
30
|
+
expect(".consolas").to have_value(consolas)
|
31
|
+
expect(".courier-new").to have_value(courier_new)
|
32
|
+
expect(".monaco").to have_value(monaco)
|
23
33
|
end
|
24
34
|
end
|
25
35
|
end
|
@@ -5,20 +5,20 @@ describe "text-inputs" do
|
|
5
5
|
ParserSupport.parse_file("addons/text-inputs")
|
6
6
|
|
7
7
|
@inputs_list = %w(
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
8
|
+
[type="color"]
|
9
|
+
[type="date"]
|
10
|
+
[type="datetime"]
|
11
|
+
[type="datetime-local"]
|
12
|
+
[type="email"]
|
13
|
+
[type="month"]
|
14
|
+
[type="number"]
|
15
|
+
[type="password"]
|
16
|
+
[type="search"]
|
17
|
+
[type="tel"]
|
18
|
+
[type="text"]
|
19
|
+
[type="time"]
|
20
|
+
[type="url"]
|
21
|
+
[type="week"]
|
22
22
|
input:not([type])
|
23
23
|
textarea
|
24
24
|
)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "font-face" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("css3/font-face-1")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with defaults" do
|
9
|
+
it "outputs defaults" do
|
10
|
+
ruleset = 'font-family: "source-sans-pro"; ' +
|
11
|
+
'font-style: normal; ' +
|
12
|
+
'font-weight: normal; ' +
|
13
|
+
'src: url("/fonts/source-sans-pro/source-sans-pro-regular.woff2") format("woff2"), url("/fonts/source-sans-pro/source-sans-pro-regular.woff") format("woff"), url("/fonts/source-sans-pro/source-sans-pro-regular.ttf") format("truetype");'
|
14
|
+
|
15
|
+
expect("@font-face").to have_ruleset(ruleset)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "font-face" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("css3/font-face-2")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with defaults" do
|
9
|
+
it "outputs defaults" do
|
10
|
+
ruleset = 'font-family: "roboto"; ' +
|
11
|
+
'font-style: "italic"; ' +
|
12
|
+
'font-weight: "bold"; ' +
|
13
|
+
'src: url("/assets/fonts/Roboto-BoldItalic.ttf") ' +
|
14
|
+
'format("truetype");'
|
15
|
+
|
16
|
+
expect("@font-face").to have_ruleset(ruleset)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "font-face" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("css3/font-face-3")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with defaults" do
|
9
|
+
it "outputs defaults" do
|
10
|
+
ruleset = 'font-family: "pitch"; ' +
|
11
|
+
'font-style: "normal"; ' +
|
12
|
+
'font-weight: "normal"; ' +
|
13
|
+
'src: url("/fonts/pitch.woff") format("woff");'
|
14
|
+
|
15
|
+
expect("@font-face").to have_ruleset(ruleset)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "font-face" do
|
4
|
+
before(:all) do
|
5
|
+
ParserSupport.parse_file("css3/font-face-4")
|
6
|
+
end
|
7
|
+
|
8
|
+
context "called with defaults" do
|
9
|
+
it "outputs defaults" do
|
10
|
+
ruleset = 'font-family: "circular"; ' +
|
11
|
+
'font-style: "normal"; ' +
|
12
|
+
'font-weight: "normal"; ' +
|
13
|
+
'src: url("/circular.woff2") format("woff2"), ' +
|
14
|
+
'url("/circular.svg#circular") format("svg");'
|
15
|
+
|
16
|
+
expect("@font-face").to have_ruleset(ruleset)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -4,8 +4,8 @@ describe "assign-inputs" do
|
|
4
4
|
before(:all) do
|
5
5
|
ParserSupport.parse_file("functions/assign-inputs")
|
6
6
|
@text_inputs_list = [
|
7
|
-
"
|
8
|
-
"
|
7
|
+
"[type=\"password\"]",
|
8
|
+
"[type=\"text\"]",
|
9
9
|
"textarea"
|
10
10
|
]
|
11
11
|
end
|
@@ -41,7 +41,7 @@ describe "assign-inputs" do
|
|
41
41
|
context "expands text inputs when middle of list" do
|
42
42
|
it "finds selectors" do
|
43
43
|
list = @text_inputs_list.dup
|
44
|
-
list.unshift "
|
44
|
+
list.unshift "[type=\"file\"]"
|
45
45
|
list.each do |input|
|
46
46
|
expect(input).to have_rule("color: #ff00ff")
|
47
47
|
end
|