diff --git a/pandas/formats/css.py b/pandas/formats/css.py index 40bc0156a1261..d9ad500b28fe6 100644 --- a/pandas/formats/css.py +++ b/pandas/formats/css.py @@ -163,8 +163,9 @@ def size_to_pt(self, val, em_pt=None, conversions=UNIT_RATIOS): try: val = float(val) except ValueError: - warnings.warn('Unhandled font size: %r' % val + unit, + warnings.warn('Unhandled size: %r' % val + unit, CSSWarning) + return self.size_to_pt('1!!default', conversions=conversions) while unit != 'pt': if unit == 'em':