This commit is contained in:
Kovid Goyal 2011-06-16 11:00:31 -06:00
parent f56abca9df
commit ce639c48f6

View File

@ -548,6 +548,7 @@ class Style(object):
profiles=[cssutils.profiles.Profiles.CSS_LEVEL_2])[1] profiles=[cssutils.profiles.Profiles.CSS_LEVEL_2])[1]
if self._bgcolor is None: if self._bgcolor is None:
col = None
val = self._style.get('background-color', None) val = self._style.get('background-color', None)
if val and validate_color(val): if val and validate_color(val):
col = val col = val
@ -569,8 +570,11 @@ class Style(object):
break break
except: except:
pass pass
self._bgcolor = col if col is None:
return self._bgcolor self._bgcolor = False
else:
self._bgcolor = col
return self._bgcolor if self._bgcolor else None
@property @property
def fontSize(self): def fontSize(self):