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
@@ -1,31 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Checks if a list contains a value(s).
|
4
|
-
///
|
5
|
-
/// @access private
|
6
|
-
///
|
7
|
-
/// @param {List} $list
|
8
|
-
/// The list to check against.
|
9
|
-
///
|
10
|
-
/// @param {List} $values
|
11
|
-
/// A single value or list of values to check for.
|
12
|
-
///
|
13
|
-
/// @example scss - Usage
|
14
|
-
/// contains($list, $value)
|
15
|
-
///
|
16
|
-
/// @return {Bool}
|
17
|
-
|
18
|
-
@function contains($list, $values...) {
|
19
|
-
@if $output-bourbon-deprecation-warnings == true {
|
20
|
-
@warn "[Bourbon] [Deprecation] `contains` is deprecated and will be " +
|
21
|
-
"removed in 5.0.0.";
|
22
|
-
}
|
23
|
-
|
24
|
-
@each $value in $values {
|
25
|
-
@if type-of(index($list, $value)) != "number" {
|
26
|
-
@return false;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
@return true;
|
31
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Checks for a valid CSS size.
|
4
|
-
///
|
5
|
-
/// @param {String} $value
|
6
|
-
///
|
7
|
-
/// @require {function} contains
|
8
|
-
/// @require {function} is-length
|
9
|
-
|
10
|
-
@function is-size($value) {
|
11
|
-
@if $output-bourbon-deprecation-warnings == true {
|
12
|
-
@warn "[Bourbon] [Deprecation] `is-size` is deprecated and will be " +
|
13
|
-
"removed in 5.0.0.";
|
14
|
-
}
|
15
|
-
|
16
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
17
|
-
$output-bourbon-deprecation-warnings: false !global;
|
18
|
-
|
19
|
-
@return is-length($value)
|
20
|
-
or contains("fill" "fit-content" "min-content" "max-content", $value);
|
21
|
-
|
22
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
23
|
-
}
|
@@ -1,74 +0,0 @@
|
|
1
|
-
// Scaling Variables
|
2
|
-
$golden: 1.618;
|
3
|
-
$minor-second: 1.067;
|
4
|
-
$major-second: 1.125;
|
5
|
-
$minor-third: 1.2;
|
6
|
-
$major-third: 1.25;
|
7
|
-
$perfect-fourth: 1.333;
|
8
|
-
$augmented-fourth: 1.414;
|
9
|
-
$perfect-fifth: 1.5;
|
10
|
-
$minor-sixth: 1.6;
|
11
|
-
$major-sixth: 1.667;
|
12
|
-
$minor-seventh: 1.778;
|
13
|
-
$major-seventh: 1.875;
|
14
|
-
$octave: 2;
|
15
|
-
$major-tenth: 2.5;
|
16
|
-
$major-eleventh: 2.667;
|
17
|
-
$major-twelfth: 3;
|
18
|
-
$double-octave: 4;
|
19
|
-
|
20
|
-
$user-output-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
21
|
-
$output-bourbon-deprecation-warnings: false;
|
22
|
-
|
23
|
-
$modular-scale-ratio: $perfect-fourth !default;
|
24
|
-
$modular-scale-base: em($em-base) !default;
|
25
|
-
|
26
|
-
$output-bourbon-deprecation-warnings: $user-output-deprecation-warnings-setting;
|
27
|
-
|
28
|
-
@function modular-scale($increment, $value: $modular-scale-base, $ratio: $modular-scale-ratio) {
|
29
|
-
$v1: nth($value, 1);
|
30
|
-
$v2: nth($value, length($value));
|
31
|
-
$value: $v1;
|
32
|
-
|
33
|
-
// scale $v2 to just above $v1
|
34
|
-
@while $v2 > $v1 {
|
35
|
-
$v2: ($v2 / $ratio); // will be off-by-1
|
36
|
-
}
|
37
|
-
@while $v2 < $v1 {
|
38
|
-
$v2: ($v2 * $ratio); // will fix off-by-1
|
39
|
-
}
|
40
|
-
|
41
|
-
// check AFTER scaling $v2 to prevent double-counting corner-case
|
42
|
-
$double-stranded: $v2 > $v1;
|
43
|
-
|
44
|
-
@if $increment > 0 {
|
45
|
-
@for $i from 1 through $increment {
|
46
|
-
@if $double-stranded and ($v1 * $ratio) > $v2 {
|
47
|
-
$value: $v2;
|
48
|
-
$v2: ($v2 * $ratio);
|
49
|
-
} @else {
|
50
|
-
$v1: ($v1 * $ratio);
|
51
|
-
$value: $v1;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
@if $increment < 0 {
|
57
|
-
// adjust $v2 to just below $v1
|
58
|
-
@if $double-stranded {
|
59
|
-
$v2: ($v2 / $ratio);
|
60
|
-
}
|
61
|
-
|
62
|
-
@for $i from $increment through -1 {
|
63
|
-
@if $double-stranded and ($v1 / $ratio) < $v2 {
|
64
|
-
$value: $v2;
|
65
|
-
$v2: ($v2 / $ratio);
|
66
|
-
} @else {
|
67
|
-
$v1: ($v1 / $ratio);
|
68
|
-
$value: $v1;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
@return $value;
|
74
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
// Convert pixels to ems
|
2
|
-
// eg. for a relational value of 12px write em(12) when the parent is 16px
|
3
|
-
// if the parent is another value say 24px write em(12, 24)
|
4
|
-
|
5
|
-
@function em($pxval, $base: $em-base) {
|
6
|
-
@if $output-bourbon-deprecation-warnings == true {
|
7
|
-
@warn "[Bourbon] [Deprecation] `em` is deprecated and will be " +
|
8
|
-
"removed in 5.0.0.";
|
9
|
-
}
|
10
|
-
|
11
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
12
|
-
$output-bourbon-deprecation-warnings: false !global;
|
13
|
-
|
14
|
-
@if not unitless($pxval) {
|
15
|
-
$pxval: strip-units($pxval);
|
16
|
-
}
|
17
|
-
@if not unitless($base) {
|
18
|
-
$base: strip-units($base);
|
19
|
-
}
|
20
|
-
|
21
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
22
|
-
|
23
|
-
@return ($pxval / $base) * 1em;
|
24
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
// Convert pixels to rems
|
2
|
-
// eg. for a relational value of 12px write rem(12)
|
3
|
-
// Assumes $em-base is the font-size of <html>
|
4
|
-
|
5
|
-
@function rem($pxval) {
|
6
|
-
@if $output-bourbon-deprecation-warnings == true {
|
7
|
-
@warn "[Bourbon] [Deprecation] `rem` is deprecated and will be " +
|
8
|
-
"removed in 5.0.0.";
|
9
|
-
}
|
10
|
-
|
11
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
12
|
-
$output-bourbon-deprecation-warnings: false !global;
|
13
|
-
|
14
|
-
@if not unitless($pxval) {
|
15
|
-
$pxval: strip-units($pxval);
|
16
|
-
}
|
17
|
-
|
18
|
-
$base: $em-base;
|
19
|
-
@if not unitless($base) {
|
20
|
-
$base: strip-units($base);
|
21
|
-
}
|
22
|
-
|
23
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
24
|
-
|
25
|
-
@return ($pxval / $base) * 1rem;
|
26
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Mixes a color with black.
|
4
|
-
///
|
5
|
-
/// @param {Color} $color
|
6
|
-
///
|
7
|
-
/// @param {Number (Percentage)} $percent
|
8
|
-
/// The amount of black to be mixed in.
|
9
|
-
///
|
10
|
-
/// @example scss - Usage
|
11
|
-
/// .element {
|
12
|
-
/// background-color: shade(#ffbb52, 60%);
|
13
|
-
/// }
|
14
|
-
///
|
15
|
-
/// @example css - CSS Output
|
16
|
-
/// .element {
|
17
|
-
/// background-color: #664a20;
|
18
|
-
/// }
|
19
|
-
///
|
20
|
-
/// @return {Color}
|
21
|
-
|
22
|
-
@function shade($color, $percent) {
|
23
|
-
@return mix(#000, $color, $percent);
|
24
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Strips the unit from a number.
|
4
|
-
///
|
5
|
-
/// @param {Number (With Unit)} $value
|
6
|
-
///
|
7
|
-
/// @example scss - Usage
|
8
|
-
/// $dimension: strip-units(10em);
|
9
|
-
///
|
10
|
-
/// @example css - CSS Output
|
11
|
-
/// $dimension: 10;
|
12
|
-
///
|
13
|
-
/// @return {Number (Unitless)}
|
14
|
-
|
15
|
-
@function strip-units($value) {
|
16
|
-
@if $output-bourbon-deprecation-warnings == true {
|
17
|
-
@warn "[Bourbon] [Deprecation] `strip-units` is deprecated and will be " +
|
18
|
-
"removed in 5.0.0 and replaced by the `strip-unit` function.";
|
19
|
-
}
|
20
|
-
|
21
|
-
@return ($value / ($value * 0 + 1));
|
22
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Mixes a color with white.
|
4
|
-
///
|
5
|
-
/// @param {Color} $color
|
6
|
-
///
|
7
|
-
/// @param {Number (Percentage)} $percent
|
8
|
-
/// The amount of white to be mixed in.
|
9
|
-
///
|
10
|
-
/// @example scss - Usage
|
11
|
-
/// .element {
|
12
|
-
/// background-color: tint(#6ecaa6, 40%);
|
13
|
-
/// }
|
14
|
-
///
|
15
|
-
/// @example css - CSS Output
|
16
|
-
/// .element {
|
17
|
-
/// background-color: #a8dfc9;
|
18
|
-
/// }
|
19
|
-
///
|
20
|
-
/// @return {Color}
|
21
|
-
|
22
|
-
@function tint($color, $percent) {
|
23
|
-
@return mix(#fff, $color, $percent);
|
24
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
// Return vendor-prefixed property names if appropriate
|
2
|
-
// Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background
|
3
|
-
//************************************************************************//
|
4
|
-
@function transition-property-names($props, $vendor: false) {
|
5
|
-
@if $output-bourbon-deprecation-warnings == true {
|
6
|
-
@warn "[Bourbon] [Deprecation] `transition-property-names` is deprecated " +
|
7
|
-
"and will be removed in 5.0.0.";
|
8
|
-
}
|
9
|
-
|
10
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
11
|
-
$output-bourbon-deprecation-warnings: false !global;
|
12
|
-
|
13
|
-
$new-props: ();
|
14
|
-
|
15
|
-
@each $prop in $props {
|
16
|
-
$new-props: append($new-props, transition-property-name($prop, $vendor), comma);
|
17
|
-
}
|
18
|
-
|
19
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
20
|
-
|
21
|
-
@return $new-props;
|
22
|
-
}
|
23
|
-
|
24
|
-
@function transition-property-name($prop, $vendor: false) {
|
25
|
-
@if $output-bourbon-deprecation-warnings == true {
|
26
|
-
@warn "[Bourbon] [Deprecation] `transition-property-name` is deprecated " +
|
27
|
-
"and will be removed in 5.0.0.";
|
28
|
-
}
|
29
|
-
|
30
|
-
// put other properties that need to be prefixed here aswell
|
31
|
-
@if $vendor and $prop == transform {
|
32
|
-
@return unquote('-'+$vendor+'-'+$prop);
|
33
|
-
}
|
34
|
-
@else {
|
35
|
-
@return $prop;
|
36
|
-
}
|
37
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
//************************************************************************//
|
2
|
-
// Helper function for str-to-num fn.
|
3
|
-
// Source: http://sassmeister.com/gist/9647408
|
4
|
-
//************************************************************************//
|
5
|
-
@function _convert-units($number, $unit) {
|
6
|
-
@if $output-bourbon-deprecation-warnings == true {
|
7
|
-
@warn "[Bourbon] [Deprecation] `_convert-units` is deprecated and will " +
|
8
|
-
"be removed in 5.0.0.";
|
9
|
-
}
|
10
|
-
|
11
|
-
$strings: "px", "cm", "mm", "%", "ch", "pica", "in", "em", "rem", "pt", "pc", "ex", "vw", "vh", "vmin", "vmax", "deg", "rad", "grad", "turn";
|
12
|
-
$units: 1px, 1cm, 1mm, 1%, 1ch, 1pica, 1in, 1em, 1rem, 1pt, 1pc, 1ex, 1vw, 1vh, 1vmin, 1vmax, 1deg, 1rad, 1grad, 1turn;
|
13
|
-
$index: index($strings, $unit);
|
14
|
-
|
15
|
-
@if not $index {
|
16
|
-
@warn "Unknown unit `#{$unit}`.";
|
17
|
-
@return false;
|
18
|
-
}
|
19
|
-
|
20
|
-
@if type-of($number) != "number" {
|
21
|
-
@warn "`#{$number} is not a number`";
|
22
|
-
@return false;
|
23
|
-
}
|
24
|
-
|
25
|
-
@return $number * nth($units, $index);
|
26
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
@function _gradient-positions-parser($gradient-type, $gradient-positions) {
|
2
|
-
@if $output-bourbon-deprecation-warnings == true {
|
3
|
-
@warn "[Bourbon] [Deprecation] `_gradient-positions-parser` is " +
|
4
|
-
"deprecated and will be removed in 5.0.0.";
|
5
|
-
}
|
6
|
-
|
7
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
8
|
-
$output-bourbon-deprecation-warnings: false !global;
|
9
|
-
|
10
|
-
@if $gradient-positions
|
11
|
-
and ($gradient-type == linear)
|
12
|
-
and (type-of($gradient-positions) != color) {
|
13
|
-
$gradient-positions: _linear-positions-parser($gradient-positions);
|
14
|
-
}
|
15
|
-
@else if $gradient-positions
|
16
|
-
and ($gradient-type == radial)
|
17
|
-
and (type-of($gradient-positions) != color) {
|
18
|
-
$gradient-positions: _radial-positions-parser($gradient-positions);
|
19
|
-
}
|
20
|
-
|
21
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
22
|
-
|
23
|
-
@return $gradient-positions;
|
24
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
// Private function for linear-gradient-parser
|
2
|
-
@function _linear-angle-parser($image, $first-val, $prefix, $suffix) {
|
3
|
-
@if $output-bourbon-deprecation-warnings == true {
|
4
|
-
@warn "[Bourbon] [Deprecation] `_linear-angle-parser` is " +
|
5
|
-
"deprecated and will be removed in 5.0.0.";
|
6
|
-
}
|
7
|
-
|
8
|
-
$offset: null;
|
9
|
-
$unit-short: str-slice($first-val, str-length($first-val) - 2, str-length($first-val));
|
10
|
-
$unit-long: str-slice($first-val, str-length($first-val) - 3, str-length($first-val));
|
11
|
-
|
12
|
-
@if ($unit-long == "grad") or
|
13
|
-
($unit-long == "turn") {
|
14
|
-
$offset: if($unit-long == "grad", -100grad * 3, -0.75turn);
|
15
|
-
}
|
16
|
-
|
17
|
-
@else if ($unit-short == "deg") or
|
18
|
-
($unit-short == "rad") {
|
19
|
-
$offset: if($unit-short == "deg", -90 * 3, 1.6rad);
|
20
|
-
}
|
21
|
-
|
22
|
-
@if $offset {
|
23
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
24
|
-
$output-bourbon-deprecation-warnings: false !global;
|
25
|
-
|
26
|
-
$num: _str-to-num($first-val);
|
27
|
-
|
28
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
29
|
-
|
30
|
-
@return (
|
31
|
-
webkit-image: -webkit- + $prefix + ($offset - $num) + $suffix,
|
32
|
-
spec-image: $image
|
33
|
-
);
|
34
|
-
}
|
35
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
@function _linear-gradient-parser($image) {
|
2
|
-
@if $output-bourbon-deprecation-warnings == true {
|
3
|
-
@warn "[Bourbon] [Deprecation] `_linear-gradient-parser` is " +
|
4
|
-
"deprecated and will be removed in 5.0.0.";
|
5
|
-
}
|
6
|
-
|
7
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
8
|
-
$output-bourbon-deprecation-warnings: false !global;
|
9
|
-
|
10
|
-
$image: unquote($image);
|
11
|
-
$gradients: ();
|
12
|
-
$start: str-index($image, "(");
|
13
|
-
$end: str-index($image, ",");
|
14
|
-
$first-val: str-slice($image, $start + 1, $end - 1);
|
15
|
-
|
16
|
-
$prefix: str-slice($image, 1, $start);
|
17
|
-
$suffix: str-slice($image, $end, str-length($image));
|
18
|
-
|
19
|
-
$has-multiple-vals: str-index($first-val, " ");
|
20
|
-
$has-single-position: unquote(_position-flipper($first-val) + "");
|
21
|
-
$has-angle: is-number(str-slice($first-val, 1, 1));
|
22
|
-
|
23
|
-
@if $has-multiple-vals {
|
24
|
-
$gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals);
|
25
|
-
}
|
26
|
-
|
27
|
-
@else if $has-single-position != "" {
|
28
|
-
$pos: unquote($has-single-position + "");
|
29
|
-
|
30
|
-
$gradients: (
|
31
|
-
webkit-image: -webkit- + $image,
|
32
|
-
spec-image: $prefix + "to " + $pos + $suffix
|
33
|
-
);
|
34
|
-
}
|
35
|
-
|
36
|
-
@else if $has-angle {
|
37
|
-
// Rotate degree for webkit
|
38
|
-
$gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix);
|
39
|
-
}
|
40
|
-
|
41
|
-
@else {
|
42
|
-
$gradients: (
|
43
|
-
webkit-image: -webkit- + $image,
|
44
|
-
spec-image: $image
|
45
|
-
);
|
46
|
-
}
|
47
|
-
|
48
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
49
|
-
|
50
|
-
@return $gradients;
|
51
|
-
}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
@function _linear-positions-parser($pos) {
|
2
|
-
@if $output-bourbon-deprecation-warnings == true {
|
3
|
-
@warn "[Bourbon] [Deprecation] `_linear-positions-parser` is " +
|
4
|
-
"deprecated and will be removed in 5.0.0.";
|
5
|
-
}
|
6
|
-
|
7
|
-
$user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings;
|
8
|
-
$output-bourbon-deprecation-warnings: false !global;
|
9
|
-
|
10
|
-
$type: type-of(nth($pos, 1));
|
11
|
-
$spec: null;
|
12
|
-
$degree: null;
|
13
|
-
$side: null;
|
14
|
-
$corner: null;
|
15
|
-
$length: length($pos);
|
16
|
-
// Parse Side and corner positions
|
17
|
-
@if ($length > 1) {
|
18
|
-
@if nth($pos, 1) == "to" { // Newer syntax
|
19
|
-
$side: nth($pos, 2);
|
20
|
-
|
21
|
-
@if $length == 2 { // eg. to top
|
22
|
-
// Swap for backwards compatibility
|
23
|
-
$degree: _position-flipper(nth($pos, 2));
|
24
|
-
}
|
25
|
-
@else if $length == 3 { // eg. to top left
|
26
|
-
$corner: nth($pos, 3);
|
27
|
-
}
|
28
|
-
}
|
29
|
-
@else if $length == 2 { // Older syntax ("top left")
|
30
|
-
$side: _position-flipper(nth($pos, 1));
|
31
|
-
$corner: _position-flipper(nth($pos, 2));
|
32
|
-
}
|
33
|
-
|
34
|
-
@if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") {
|
35
|
-
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
36
|
-
}
|
37
|
-
@else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") {
|
38
|
-
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
39
|
-
}
|
40
|
-
@else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") {
|
41
|
-
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
42
|
-
}
|
43
|
-
@else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") {
|
44
|
-
$degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
|
45
|
-
}
|
46
|
-
$spec: to $side $corner;
|
47
|
-
}
|
48
|
-
@else if $length == 1 {
|
49
|
-
// Swap for backwards compatibility
|
50
|
-
@if $type == string {
|
51
|
-
$degree: $pos;
|
52
|
-
$spec: to _position-flipper($pos);
|
53
|
-
}
|
54
|
-
@else {
|
55
|
-
$degree: -270 - $pos; //rotate the gradient opposite from spec
|
56
|
-
$spec: $pos;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
$degree: unquote($degree + ",");
|
60
|
-
$spec: unquote($spec + ",");
|
61
|
-
|
62
|
-
$output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global;
|
63
|
-
|
64
|
-
@return $degree $spec;
|
65
|
-
}
|
66
|
-
|
67
|
-
@function _position-flipper($pos) {
|
68
|
-
@if $output-bourbon-deprecation-warnings == true {
|
69
|
-
@warn "[Bourbon] [Deprecation] `_position-flipper` is " +
|
70
|
-
"deprecated and will be removed in 5.0.0.";
|
71
|
-
}
|
72
|
-
|
73
|
-
@return if($pos == left, right, null)
|
74
|
-
if($pos == right, left, null)
|
75
|
-
if($pos == top, bottom, null)
|
76
|
-
if($pos == bottom, top, null);
|
77
|
-
}
|