Skip to content

Commit

Permalink
lint: Add c-027, font size below 1
Browse files Browse the repository at this point in the history
  • Loading branch information
acabal committed Nov 6, 2024
1 parent 12c97cf commit 8a7017a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions se/se_epub_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8a7017a

Please sign in to comment.