docs: function fixGradient(str) {
    var ret = str.replace(GRADIENT_REPLACE_RE, function($0, $1, $2){
      return $1 ?
        $0 :
        ($2 == 'right') ?
          'left' :
          ($2 == 'left') ?
            'right' :
            (parseInt($2) % 180 == 0) ?
              $2 :
              ($2.substr(0,1) == '-') ?
                $2.substr(1) :
                ('-' + $2);
      });
    return ret;
  }