myheats-website

Website for myheats
git clone https://git.in0rdr.ch/myheats-website.git
Log | Files | Refs | Pull requests | README | LICENSE

_linear-side-corner-parser.scss (915B)


      1 // Private function for linear-gradient-parser
      2 @function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) {
      3   $val-1: str-slice($first-val, 1, $has-multiple-vals - 1);
      4   $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val));
      5   $val-3: null;
      6   $has-val-3: str-index($val-2, " ");
      7 
      8   @if $has-val-3 {
      9     $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2));
     10     $val-2: str-slice($val-2, 1, $has-val-3 - 1);
     11   }
     12 
     13   $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3);
     14   $pos: unquote($pos + "");
     15 
     16   // Use old spec for webkit
     17   @if $val-1 == "to" {
     18     @return (
     19       webkit-image: -webkit- + $prefix + $pos + $suffix,
     20       spec-image: $image
     21     );
     22   }
     23 
     24   // Bring the code up to spec
     25   @else {
     26     @return (
     27       webkit-image: -webkit- + $image,
     28       spec-image: $prefix + "to " + $pos + $suffix
     29     );
     30   }
     31 }