isValidGapValue static method

bool isValidGapValue(
  1. String val
)

Implementation

static bool isValidGapValue(String val) {
  if (val == 'normal') return true;
  // `gap`/`row-gap`/`column-gap`: `normal | <length-percentage>`
  // Negative values are invalid.
  return CSSLength.isNonNegativeLength(val) ||
      CSSPercentage.isNonNegativePercentage(val) ||
      // Allow function notations like `calc(...)` and `var(...)`.
      CSSFunction.isFunction(val);
}