bourbon 4.1.1 → 4.2.0.beta
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/.gitignore +4 -3
- data/.hound.yml +4 -0
- data/.npmignore +5 -2
- data/.scss-lint.yml +175 -0
- data/README.md +7 -12
- data/Rakefile +6 -4
- data/app/assets/stylesheets/_bourbon-deprecated-upcoming.scss +16 -7
- data/app/assets/stylesheets/_bourbon.scss +27 -26
- data/app/assets/stylesheets/addons/_border-color.scss +26 -0
- data/app/assets/stylesheets/addons/_border-radius.scss +48 -0
- data/app/assets/stylesheets/addons/_border-style.scss +25 -0
- data/app/assets/stylesheets/addons/_border-width.scss +25 -0
- data/app/assets/stylesheets/addons/_buttons.scss +64 -0
- data/app/assets/stylesheets/addons/_clearfix.scss +17 -10
- data/app/assets/stylesheets/addons/_ellipsis.scss +22 -0
- data/app/assets/stylesheets/addons/{_font-family.scss → _font-stacks.scss} +26 -0
- data/app/assets/stylesheets/addons/_hide-text.scss +23 -8
- data/app/assets/stylesheets/addons/_margin.scss +26 -0
- data/app/assets/stylesheets/addons/_padding.scss +26 -0
- data/app/assets/stylesheets/addons/_position.scss +24 -2
- data/app/assets/stylesheets/addons/_prefixer.scss +36 -15
- data/app/assets/stylesheets/addons/_size.scss +30 -1
- data/app/assets/stylesheets/addons/_text-inputs.scss +112 -0
- data/app/assets/stylesheets/addons/_timing-functions.scss +7 -5
- data/app/assets/stylesheets/addons/_triangle.scss +11 -11
- data/app/assets/stylesheets/addons/_word-wrap.scss +19 -0
- data/app/assets/stylesheets/css3/_animation.scss +14 -23
- data/app/assets/stylesheets/css3/_appearance.scss +1 -1
- data/app/assets/stylesheets/css3/_backface-visibility.scss +0 -3
- data/app/assets/stylesheets/css3/_background-image.scss +1 -1
- data/app/assets/stylesheets/css3/_background.scss +3 -3
- data/app/assets/stylesheets/css3/_border-image.scss +3 -3
- data/app/assets/stylesheets/css3/_calc.scss +1 -1
- data/app/assets/stylesheets/css3/_columns.scss +8 -8
- data/app/assets/stylesheets/css3/_filter.scss +0 -1
- data/app/assets/stylesheets/css3/_flex-box.scss +16 -47
- data/app/assets/stylesheets/css3/_font-feature-settings.scss +1 -7
- data/app/assets/stylesheets/css3/_hyphens.scss +2 -2
- data/app/assets/stylesheets/css3/_image-rendering.scss +6 -6
- data/app/assets/stylesheets/css3/_keyframes.scss +1 -0
- data/app/assets/stylesheets/css3/_linear-gradient.scss +11 -11
- data/app/assets/stylesheets/css3/_radial-gradient.scss +14 -14
- data/app/assets/stylesheets/css3/_selection.scss +39 -11
- data/app/assets/stylesheets/css3/_transform.scss +5 -5
- data/app/assets/stylesheets/css3/_transition.scss +17 -23
- data/app/assets/stylesheets/css3/_user-select.scss +2 -2
- data/app/assets/stylesheets/functions/{_assign.scss → _assign-inputs.scss} +2 -2
- data/app/assets/stylesheets/functions/_contains-falsy.scss +20 -0
- data/app/assets/stylesheets/functions/_contains.scss +16 -2
- data/app/assets/stylesheets/functions/_is-length.scss +5 -1
- data/app/assets/stylesheets/functions/_is-light.scss +21 -0
- data/app/assets/stylesheets/functions/_is-number.scss +11 -0
- data/app/assets/stylesheets/functions/_is-size.scss +8 -1
- data/app/assets/stylesheets/functions/_px-to-em.scss +2 -2
- data/app/assets/stylesheets/functions/_px-to-rem.scss +2 -2
- data/app/assets/stylesheets/functions/_shade.scss +24 -0
- data/app/assets/stylesheets/functions/_strip-units.scss +15 -3
- data/app/assets/stylesheets/functions/_tint.scss +24 -0
- data/app/assets/stylesheets/functions/_transition-property-name.scss +14 -14
- data/app/assets/stylesheets/functions/_unpack.scss +18 -8
- data/app/assets/stylesheets/helpers/_convert-units.scss +2 -2
- data/app/assets/stylesheets/helpers/_directional-values.scss +96 -0
- data/app/assets/stylesheets/helpers/_font-source-declaration.scss +2 -1
- data/app/assets/stylesheets/helpers/_linear-gradient-parser.scss +1 -1
- data/app/assets/stylesheets/helpers/_linear-positions-parser.scss +1 -1
- data/app/assets/stylesheets/helpers/_radial-arg-parser.scss +10 -10
- data/app/assets/stylesheets/helpers/_radial-gradient-parser.scss +4 -4
- data/app/assets/stylesheets/helpers/_radial-positions-parser.scss +2 -2
- data/app/assets/stylesheets/helpers/_str-to-num.scss +3 -3
- data/app/assets/stylesheets/settings/_asset-pipeline.scss +6 -0
- data/app/assets/stylesheets/settings/_prefixer.scss +5 -2
- data/bourbon.gemspec +4 -2
- data/bower.json +8 -6
- data/lib/bourbon/version.rb +1 -1
- data/package.json +1 -1
- data/spec/bourbon/functions/assign_inputs_spec.rb +50 -0
- data/spec/bourbon/functions/contains_spec.rb +27 -0
- data/spec/bourbon/functions/is_length_spec.rb +49 -0
- data/spec/bourbon/functions/is_light_spec.rb +37 -0
- data/spec/bourbon/functions/is_number_spec.rb +43 -0
- data/spec/bourbon/functions/is_size_spec.rb +43 -0
- data/spec/bourbon/functions/modular_scale_spec.rb +43 -0
- data/spec/bourbon/functions/px_to_em_spec.rb +31 -0
- data/spec/fixtures/_setup.scss +1 -0
- data/spec/fixtures/functions/assign-inputs.scss +19 -0
- data/spec/fixtures/functions/contains.scss +28 -0
- data/spec/fixtures/functions/is-length.scss +35 -0
- data/spec/fixtures/functions/is-light.scss +29 -0
- data/spec/fixtures/functions/is-number.scss +31 -0
- data/spec/fixtures/functions/is-size.scss +31 -0
- data/spec/fixtures/functions/modular-scale.scss +29 -0
- data/spec/fixtures/functions/px-to-em.scss +17 -0
- data/spec/spec_helper.rb +22 -0
- data/spec/support/matchers/be_contained_in.rb +10 -0
- data/spec/support/matchers/have_rule.rb +35 -0
- data/spec/support/matchers/have_value.rb +15 -0
- data/spec/support/parser_support.rb +16 -0
- data/spec/support/sass_support.rb +10 -0
- metadata +102 -19
- data/app/assets/stylesheets/addons/_directional-values.scss +0 -111
- data/app/assets/stylesheets/addons/_html5-input-types.scss +0 -90
- data/app/assets/stylesheets/css3/_border-radius.scss +0 -22
- data/app/assets/stylesheets/css3/_box-sizing.scss +0 -4
- data/app/assets/stylesheets/functions/_color-lightness.scss +0 -13
- data/app/assets/stylesheets/functions/_tint-shade.scss +0 -9
- data/app/assets/stylesheets/helpers/_is-num.scss +0 -5
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Checks if a list does not contains a value.
|
|
4
|
+
///
|
|
5
|
+
/// @access private
|
|
6
|
+
///
|
|
7
|
+
/// @param {List} $list
|
|
8
|
+
/// The list to check against.
|
|
9
|
+
///
|
|
10
|
+
/// @return {Bool}
|
|
11
|
+
|
|
12
|
+
@function contains-falsy($list) {
|
|
13
|
+
@each $item in $list {
|
|
14
|
+
@if not $item {
|
|
15
|
+
@return true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@return false;
|
|
20
|
+
}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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}
|
|
3
17
|
|
|
4
18
|
@function contains($list, $values...) {
|
|
5
19
|
@each $value in $values {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Programatically determines whether a color is light or dark.
|
|
4
|
+
///
|
|
5
|
+
/// @link http://robots.thoughtbot.com/closer-look-color-lightness
|
|
6
|
+
///
|
|
7
|
+
/// @param {Color (Hex)} $color
|
|
8
|
+
///
|
|
9
|
+
/// @example scss - Usage
|
|
10
|
+
/// is-light($color)
|
|
11
|
+
///
|
|
12
|
+
/// @return {Bool}
|
|
13
|
+
|
|
14
|
+
@function is-light($hex-color) {
|
|
15
|
+
$-local-red: red(rgba($hex-color, 1));
|
|
16
|
+
$-local-green: green(rgba($hex-color, 1));
|
|
17
|
+
$-local-blue: blue(rgba($hex-color, 1));
|
|
18
|
+
$-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255;
|
|
19
|
+
|
|
20
|
+
@return $-local-lightness > 0.6;
|
|
21
|
+
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
@function em($pxval, $base: $em-base) {
|
|
6
6
|
@if not unitless($pxval) {
|
|
7
|
-
|
|
7
|
+
$pxval: strip-units($pxval);
|
|
8
8
|
}
|
|
9
9
|
@if not unitless($base) {
|
|
10
|
-
|
|
10
|
+
$base: strip-units($base);
|
|
11
11
|
}
|
|
12
12
|
@return ($pxval / $base) * 1em;
|
|
13
13
|
}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
@function rem($pxval) {
|
|
6
6
|
@if not unitless($pxval) {
|
|
7
|
-
|
|
7
|
+
$pxval: strip-units($pxval);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
$base: $em-base;
|
|
11
11
|
@if not unitless($base) {
|
|
12
|
-
|
|
12
|
+
$base: strip-units($base);
|
|
13
13
|
}
|
|
14
14
|
@return ($pxval / $base) * 1rem;
|
|
15
15
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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,5 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
@charset "UTF-8";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
@return ($value / ($value * 0 + 1));
|
|
5
17
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
}
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
// Example: transition-property-names((transform, color, background), moz) -> -moz-transform, color, background
|
|
3
3
|
//************************************************************************//
|
|
4
4
|
@function transition-property-names($props, $vendor: false) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@each $prop in $props {
|
|
8
|
-
$new-props: append($new-props, transition-property-name($prop, $vendor), comma);
|
|
9
|
-
}
|
|
5
|
+
$new-props: ();
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
@each $prop in $props {
|
|
8
|
+
$new-props: append($new-props, transition-property-name($prop, $vendor), comma);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@return $new-props;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
@function transition-property-name($prop, $vendor: false) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
15
|
+
// put other properties that need to be prefixed here aswell
|
|
16
|
+
@if $vendor and $prop == transform {
|
|
17
|
+
@return unquote('-'+$vendor+'-'+$prop);
|
|
18
|
+
}
|
|
19
|
+
@else {
|
|
20
|
+
@return $prop;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Converts shorthand to the 4-value syntax.
|
|
4
|
+
///
|
|
5
|
+
/// @param {List} $shorthand
|
|
6
|
+
///
|
|
7
|
+
/// @example scss - Usage
|
|
8
|
+
/// .element {
|
|
9
|
+
/// margin: unpack(1em 2em);
|
|
10
|
+
/// }
|
|
11
|
+
///
|
|
12
|
+
/// @example css - CSS Output
|
|
13
|
+
/// .element {
|
|
14
|
+
/// margin: 1em 2em 1em 2em;
|
|
15
|
+
/// }
|
|
2
16
|
|
|
3
17
|
@function unpack($shorthand) {
|
|
4
18
|
@if length($shorthand) == 1 {
|
|
5
19
|
@return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
|
|
6
|
-
}
|
|
7
|
-
@else if length($shorthand) == 2 {
|
|
20
|
+
} @else if length($shorthand) == 2 {
|
|
8
21
|
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
|
|
9
|
-
}
|
|
10
|
-
@else if length($shorthand) == 3 {
|
|
22
|
+
} @else if length($shorthand) == 3 {
|
|
11
23
|
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
|
|
12
|
-
}
|
|
13
|
-
@else {
|
|
24
|
+
} @else {
|
|
14
25
|
@return $shorthand;
|
|
15
26
|
}
|
|
16
27
|
}
|
|
17
|
-
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// Source: http://sassmeister.com/gist/9647408
|
|
4
4
|
//************************************************************************//
|
|
5
5
|
@function _convert-units($number, $unit) {
|
|
6
|
-
$strings:
|
|
7
|
-
$units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax,
|
|
6
|
+
$strings: "px" "cm" "mm" "%" "ch" "pica" "in" "em" "rem" "pt" "pc" "ex" "vw" "vh" "vmin" "vmax", "deg", "rad", "grad", "turn";
|
|
7
|
+
$units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax, 1deg, 1rad, 1grad, 1turn;
|
|
8
8
|
$index: index($strings, $unit);
|
|
9
9
|
|
|
10
10
|
@if not $index {
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
/// Directional-property mixins are shorthands for writing properties like the following
|
|
4
|
+
///
|
|
5
|
+
/// @ignore You can also use `false` instead of `null`.
|
|
6
|
+
///
|
|
7
|
+
/// @param {List} $vals
|
|
8
|
+
/// List of directional values
|
|
9
|
+
///
|
|
10
|
+
/// @example scss - Usage
|
|
11
|
+
/// .element {
|
|
12
|
+
/// @include border-style(dotted null);
|
|
13
|
+
/// @include margin(null 0 10px);
|
|
14
|
+
/// }
|
|
15
|
+
///
|
|
16
|
+
/// @example css - CSS Output
|
|
17
|
+
/// .element {
|
|
18
|
+
/// border-bottom-style: dotted;
|
|
19
|
+
/// border-top-style: dotted;
|
|
20
|
+
/// margin-bottom: 10px;
|
|
21
|
+
/// margin-left: 0;
|
|
22
|
+
/// margin-right: 0;
|
|
23
|
+
/// }
|
|
24
|
+
///
|
|
25
|
+
/// @require {function} contains-falsy
|
|
26
|
+
///
|
|
27
|
+
/// @return {List}
|
|
28
|
+
|
|
29
|
+
@function collapse-directionals($vals) {
|
|
30
|
+
$output: null;
|
|
31
|
+
|
|
32
|
+
$a: nth($vals, 1);
|
|
33
|
+
$b: if(length($vals) < 2, $a, nth($vals, 2));
|
|
34
|
+
$c: if(length($vals) < 3, $a, nth($vals, 3));
|
|
35
|
+
$d: if(length($vals) < 2, $a, nth($vals, if(length($vals) < 4, 2, 4)));
|
|
36
|
+
|
|
37
|
+
@if $a == 0 { $a: 0; }
|
|
38
|
+
@if $b == 0 { $b: 0; }
|
|
39
|
+
@if $c == 0 { $c: 0; }
|
|
40
|
+
@if $d == 0 { $d: 0; }
|
|
41
|
+
|
|
42
|
+
@if $a == $b and $a == $c and $a == $d { $output: $a; }
|
|
43
|
+
@else if $a == $c and $b == $d { $output: $a $b; }
|
|
44
|
+
@else if $b == $d { $output: $a $b $c; }
|
|
45
|
+
@else { $output: $a $b $c $d; }
|
|
46
|
+
|
|
47
|
+
@return $output;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/// Output directional properties, for instance `margin`.
|
|
51
|
+
///
|
|
52
|
+
/// @access private
|
|
53
|
+
///
|
|
54
|
+
/// @param {String} $pre
|
|
55
|
+
/// Prefix to use
|
|
56
|
+
/// @param {String} $suf
|
|
57
|
+
/// Suffix to use
|
|
58
|
+
/// @param {List} $vals
|
|
59
|
+
/// List of values
|
|
60
|
+
///
|
|
61
|
+
/// @require {function} collapse-directionals
|
|
62
|
+
/// @require {function} contains-falsy
|
|
63
|
+
|
|
64
|
+
@mixin directional-property($pre, $suf, $vals) {
|
|
65
|
+
// Property Names
|
|
66
|
+
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
|
|
67
|
+
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
|
|
68
|
+
$left: $pre + "-left" + if($suf, "-#{$suf}", "");
|
|
69
|
+
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
|
|
70
|
+
$all: $pre + if($suf, "-#{$suf}", "");
|
|
71
|
+
|
|
72
|
+
$vals: collapse-directionals($vals);
|
|
73
|
+
|
|
74
|
+
@if contains-falsy($vals) {
|
|
75
|
+
@if nth($vals, 1) { #{$top}: nth($vals, 1); }
|
|
76
|
+
|
|
77
|
+
@if length($vals) == 1 {
|
|
78
|
+
@if nth($vals, 1) { #{$right}: nth($vals, 1); }
|
|
79
|
+
} @else {
|
|
80
|
+
@if nth($vals, 2) { #{$right}: nth($vals, 2); }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@if length($vals) == 2 {
|
|
84
|
+
@if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
|
|
85
|
+
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
|
|
86
|
+
} @else if length($vals) == 3 {
|
|
87
|
+
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
|
|
88
|
+
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
|
|
89
|
+
} @else if length($vals) == 4 {
|
|
90
|
+
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
|
|
91
|
+
@if nth($vals, 4) { #{$left}: nth($vals, 4); }
|
|
92
|
+
}
|
|
93
|
+
} @else {
|
|
94
|
+
#{$all}: $vals;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
$has-multiple-vals: str-index($first-val, " ");
|
|
12
12
|
$has-single-position: unquote(_position-flipper($first-val) + "");
|
|
13
|
-
$has-angle:
|
|
13
|
+
$has-angle: is-number(str-slice($first-val, 0, 0));
|
|
14
14
|
|
|
15
15
|
@if $has-multiple-vals {
|
|
16
16
|
$gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@function _radial-arg-parser($
|
|
2
|
-
@each $value in $
|
|
1
|
+
@function _radial-arg-parser($g1, $g2, $pos, $shape-size) {
|
|
2
|
+
@each $value in $g1, $g2 {
|
|
3
3
|
$first-val: nth($value, 1);
|
|
4
4
|
$pos-type: type-of($first-val);
|
|
5
5
|
$spec-at-index: null;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
$pos: $pos nth($value, $i);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
$
|
|
25
|
+
$g1: null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// If not spec calculate correct values
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
|
|
38
38
|
$pos: $value;
|
|
39
39
|
|
|
40
|
-
@if $pos == $
|
|
41
|
-
$
|
|
40
|
+
@if $pos == $g1 {
|
|
41
|
+
$g1: null;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
|
|
55
55
|
$shape-size: $value;
|
|
56
56
|
|
|
57
|
-
@if $value == $
|
|
58
|
-
$
|
|
57
|
+
@if $value == $g1 {
|
|
58
|
+
$g1: null;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@else if $value == $
|
|
62
|
-
$
|
|
61
|
+
@else if $value == $g2 {
|
|
62
|
+
$g2: null;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
@return $
|
|
68
|
+
@return $g1, $g2, $pos, $shape-size;
|
|
69
69
|
}
|