if (value.getPrimitiveType() == CSSPrimitiveValue.CSS_IDENT) {
IdentValue ident = checkIdent(cssName, value);
checkValidity(cssName, BORDER_WIDTHS, ident);
return Collections.singletonList(
new PropertyDeclaration(
cssName, Conversions.getBorderWidth(ident.toString()), important, origin));
} else {
if (value.getFloatValue() < 0.0f) {
throw new CSSParseException(cssName + " may not be negative", -1);
}
}
}
return Collections.singletonList(
new PropertyDeclaration(cssName, value, important, origin));
}