Handle badly malformed font sizes in CSS

This commit is contained in:
Kovid Goyal 2009-07-28 14:12:52 -06:00
parent a4e2d6acb5
commit e9eaee4969

View File

@ -411,6 +411,8 @@ class Style(object):
result = size
else:
result = self._unit_convert(value, base=base, font=base)
if not isinstance(result, (int, float, long)):
return base
if result < 0:
result = normalize_fontsize("smaller", base)
if factor: