parseByName static method
Implementation
static CSSValue? parseByName(Object value, String name) {
switch (name) {
case 'color':
return CSSColor.from(value);
case 'background-color':
return CSSColor.from(value);
case 'background':
return CSSBackground.from(value);
case 'width':
return CSSLength.from(value);
case 'height':
return CSSLength.from(value);
case 'border':
return CSSBorder.from(value);
case 'opacity':
return CSSNumber.from(value);
case 'display':
return CSSGeneric.from(value);
default:
return CSSValue.from(value);
}
}