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:
parent
8a4a696175
commit
de17c7c3a0
@ -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',
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user