summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss
diff options
context:
space:
mode:
Diffstat (limited to 'debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss')
-rw-r--r--debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss74
1 files changed, 74 insertions, 0 deletions
diff --git a/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss b/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss
new file mode 100644
index 0000000..866ee21
--- /dev/null
+++ b/debian/missing-sources/bourbon/app/assets/stylesheets/helpers/_radial-arg-parser.scss
@@ -0,0 +1,74 @@
+@function _radial-arg-parser($g1, $g2, $pos, $shape-size) {
+ @if $output-bourbon-deprecation-warnings == true {
+ @warn "[Bourbon] [Deprecation] `_radial-arg-parser` is " +
+ "deprecated and will be removed in 5.0.0.";
+ }
+
+ @each $value in $g1, $g2 {
+ $first-val: nth($value, 1);
+ $pos-type: type-of($first-val);
+ $spec-at-index: null;
+
+ // Determine if spec was passed to mixin
+ @if type-of($value) == list {
+ $spec-at-index: if(index($value, at), index($value, at), false);
+ }
+ @if $spec-at-index {
+ @if $spec-at-index > 1 {
+ @for $i from 1 through ($spec-at-index - 1) {
+ $shape-size: $shape-size nth($value, $i);
+ }
+ @for $i from ($spec-at-index + 1) through length($value) {
+ $pos: $pos nth($value, $i);
+ }
+ }
+ @else if $spec-at-index == 1 {
+ @for $i from ($spec-at-index + 1) through length($value) {
+ $pos: $pos nth($value, $i);
+ }
+ }
+ $g1: null;
+ }
+
+ // If not spec calculate correct values
+ @else {
+ @if ($pos-type != color) or ($first-val != "transparent") {
+ @if ($pos-type == number)
+ or ($first-val == "center")
+ or ($first-val == "top")
+ or ($first-val == "right")
+ or ($first-val == "bottom")
+ or ($first-val == "left") {
+
+ $pos: $value;
+
+ @if $pos == $g1 {
+ $g1: null;
+ }
+ }
+
+ @else if
+ ($first-val == "ellipse")
+ or ($first-val == "circle")
+ or ($first-val == "closest-side")
+ or ($first-val == "closest-corner")
+ or ($first-val == "farthest-side")
+ or ($first-val == "farthest-corner")
+ or ($first-val == "contain")
+ or ($first-val == "cover") {
+
+ $shape-size: $value;
+
+ @if $value == $g1 {
+ $g1: null;
+ }
+
+ @else if $value == $g2 {
+ $g2: null;
+ }
+ }
+ }
+ }
+ }
+ @return $g1, $g2, $pos, $shape-size;
+}