diff --git a/se/se_epub_lint.py b/se/se_epub_lint.py index 61803c8a..c2d7fc31 100644 --- a/se/se_epub_lint.py +++ b/se/se_epub_lint.py @@ -146,6 +146,7 @@ "c-024", "Illegal unit used to set [css]line-height[/]. Hint: [css]line-height[/] is set without any units." "c-025", "Illegal percent unit used to set [css]height[/] or positioning property. Hint: [css]vh[/] to specify vertical-oriented properties like height or position." "c-026", "Table that appears to be listing numbers, but without [css]font-variant-numeric: tabular-nums;[/]." +"c-027", "Font size below 1." FILESYSTEM "f-001", "Illegal file or directory." @@ -1120,6 +1121,10 @@ def _lint_css_checks(self, local_css_path: Path, abbr_with_whitespace: list) -> if matches: messages.append(LintMessage("c-025", "Illegal percent unit used to set [css]height[/] or positioning property. Hint: [css]vh[/] to specify vertical-oriented properties like height or position.", se.MESSAGE_TYPE_ERROR, local_css_path)) + matches = regex.search(r"font-size: \.", self.local_css) + if matches: + messages.append(LintMessage("c-027", "Font size below 1.", se.MESSAGE_TYPE_ERROR, local_css_path)) + return messages def _update_missing_styles(filename: Path, dom: se.easy_xml.EasyXmlTree, local_css: dict) -> list: