src/sass/parse.js
function checkKeyframesSelector(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkIdent(i)) {
    // Valid selectors are only `from` and `to`.
    const selector = joinValues2(i, l);
    if (selector !== 'from' && selector !== 'to') return 0;

    i += l;
    tokens[start].keyframesSelectorType = 1;
  } else if (l = checkPercentage(i)) {
    i += l;
    tokens[start].keyframesSelectorType = 2;
  } else if (l = checkInterpolation(i)) {
    i += l;
    tokens[start].keyframesSelectorType = 3;
  } else {
    return 0;
  }

  return i - start;
}
function checkKeyframesSelector(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkIdent(i)) {
    // Valid selectors are only `from` and `to`.
    const selector = joinValues2(i, l);
    if (selector !== 'from' && selector !== 'to') return 0;

    i += l;
    tokens[start].keyframesSelectorType = 1;
  } else if (l = checkPercentage(i)) {
    i += l;
    tokens[start].keyframesSelectorType = 2;
  } else if (l = checkInterpolation(i)) {
    i += l;
    tokens[start].keyframesSelectorType = 3;
  } else {
    return 0;
  }

  return i - start;
}
function checkKeyframesSelector ( i ) { const start = i ; let l ; if ( i >= tokensLength ) return 0 ; if ( l = checkIdent ( i ) ) { // Valid selectors are only `from` and `to`. const selector = joinValues2 ( i , l ) ; if ( selector !== 'from' && selector !== 'to' ) return 0 ; i += l ; tokens [ start ] . keyframesSelectorType = 1 ; } else if ( l = checkPercentage ( i ) ) { i += l ; tokens [ start ] . keyframesSelectorType = 2 ; } else if ( l = checkInterpolation ( i ) ) { i += l ; tokens [ start ] . keyframesSelectorType = 3 ; } else { return 0 ; } return i - start ; }
Check a single keyframe selector - `5%`, `from` etc
@param {Number} i
@return {Number}
Check a single keyframe selector - 5% from etc