This commit is contained in:
Kovid Goyal 2016-06-23 17:35:03 +05:30
parent 7e1d8a96e9
commit ec1b079460

View File

@ -1894,10 +1894,10 @@ class KOBOTOUCH(KOBO):
return extra_sheet return extra_sheet
def get_extra_css_rules(self, sheet, css_rule): def get_extra_css_rules(self, sheet, css_rule):
from cssutils.css import CSSRule
return [r for r in sheet.cssRules.rulesOfType(css_rule)] return [r for r in sheet.cssRules.rulesOfType(css_rule)]
def get_extra_css_rules_widow_orphan(self, sheet): def get_extra_css_rules_widow_orphan(self, sheet):
from cssutils.css import CSSRule
return [r for r in self.get_extra_css_rules(sheet, CSSRule.STYLE_RULE) return [r for r in self.get_extra_css_rules(sheet, CSSRule.STYLE_RULE)
if (r.style['widows'] or r.style['orphans'])] if (r.style['widows'] or r.style['orphans'])]