diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:56:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:56:52 +0000 |
commit | 087bd1b14d5e1f45f60b1ffa64ca318c23b7c6ea (patch) | |
tree | d4139abfdd8c50b4b0ac84d876808a2f525dc958 /debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss | |
parent | Adding upstream version 2.0.0+dfsg. (diff) | |
download | sphinx-rtd-theme-debian.tar.xz sphinx-rtd-theme-debian.zip |
Adding debian version 2.0.0+dfsg-1.debian/2.0.0+dfsg-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss b/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss new file mode 100644 index 0000000..1553883 --- /dev/null +++ b/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_linear-gradient-parser.scss @@ -0,0 +1,51 @@ +@function _linear-gradient-parser($image) { + @if $output-bourbon-deprecation-warnings == true { + @warn "[Bourbon] [Deprecation] `_linear-gradient-parser` is " + + "deprecated and will be removed in 5.0.0."; + } + + $user-deprecation-warnings-setting: $output-bourbon-deprecation-warnings; + $output-bourbon-deprecation-warnings: false !global; + + $image: unquote($image); + $gradients: (); + $start: str-index($image, "("); + $end: str-index($image, ","); + $first-val: str-slice($image, $start + 1, $end - 1); + + $prefix: str-slice($image, 1, $start); + $suffix: str-slice($image, $end, str-length($image)); + + $has-multiple-vals: str-index($first-val, " "); + $has-single-position: unquote(_position-flipper($first-val) + ""); + $has-angle: is-number(str-slice($first-val, 1, 1)); + + @if $has-multiple-vals { + $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals); + } + + @else if $has-single-position != "" { + $pos: unquote($has-single-position + ""); + + $gradients: ( + webkit-image: -webkit- + $image, + spec-image: $prefix + "to " + $pos + $suffix + ); + } + + @else if $has-angle { + // Rotate degree for webkit + $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix); + } + + @else { + $gradients: ( + webkit-image: -webkit- + $image, + spec-image: $image + ); + } + + $output-bourbon-deprecation-warnings: $user-deprecation-warnings-setting !global; + + @return $gradients; +} |