resolveCSSViewportUnitValue method
Resolves a Viewport CSSUnit (vw
, vh
, vmin
, vmax
) value
to a px
value as String.
Implementation
String resolveCSSViewportUnitValue(num value, CSSUnit unit,
{bool originalValueAsComment = true}) {
var resolved = resolveViewportCSSLength(value, unit);
var resolvedStr = resolved.toString(this);
if (originalValueAsComment) {
var originalValue = resolveCSSUnitValue(value, unit);
resolvedStr += ' /* DOMContext-original-value: $originalValue */';
}
return resolvedStr;
}