resolveValue static method

CSSLength resolveValue(
  1. DOMContext? domContext,
  2. num value,
  3. CSSUnit unit, {
  4. bool originalValueAsComment = true,
})

Implementation

static CSSLength resolveValue(DOMContext? domContext, num value, CSSUnit unit,
    {bool originalValueAsComment = true}) {
  if (domContext != null &&
      domContext.resolveCSSViewportUnit &&
      isCSSViewportUnit(unit) &&
      domContext.viewport != null) {
    var resolvedViewport = domContext.resolveViewportCSSLength(value, unit);
    return resolvedViewport;
  } else {
    return CSSLength(value, unit);
  }
}