Skip to content

Commit

Permalink
Fix #1538.
Browse files Browse the repository at this point in the history
Raise an InvalidValues error when text-align value is None.
  • Loading branch information
grewn0uille committed Jan 12, 2022
1 parent 72d05e3 commit 608de69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions weasyprint/css/validation/expanders.py
Expand Up @@ -646,6 +646,8 @@ def expand_text_align(base_url, name, tokens):
"""Expand the ``text-align`` property."""
if len(tokens) == 1:
keyword = get_single_keyword(tokens)
if keyword is None:
raise InvalidValues
align_all = 'justify' if keyword == 'justify-all' else keyword
yield 'text_align_all', align_all
align_last = 'start' if keyword == 'justify' else align_all
Expand Down

0 comments on commit 608de69

Please sign in to comment.