1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Support the "continue" property

This commit is contained in:
Guillaume Ayoub 2021-01-18 17:40:32 +01:00
parent 8a4a696175
commit de17c7c3a0
3 changed files with 11 additions and 0 deletions

View File

@ -184,6 +184,7 @@ INITIAL_VALUES = {
'text_decoration_style': 'solid',
# Overflow Module 3 (WD): https://www.w3.org/TR/css-overflow-3/
'continue': 'auto',
'overflow': 'visible',
'text_overflow': 'clip',

View File

@ -326,6 +326,13 @@ def box_decoration_break(keyword):
return keyword in ('slice', 'clone')
@property('continue', unstable=True)
@single_keyword
def continue_(keyword):
"""``continue`` property validation."""
return keyword in ('auto', 'discard')
@property(unstable=True)
@single_keyword
def margin_break(keyword):

View File

@ -595,6 +595,9 @@ def block_container_layout(context, box, max_position_y, skip_stack,
else:
resume_at = None
if box.style['continue'] == 'discard':
resume_at = None
if (resume_at is not None and
box.style['break_inside'] in ('avoid', 'avoid-page') and
not page_is_empty):