mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-03 23:48:07 +03:00
Test nested line-clamp
This commit is contained in:
parent
5eefead05a
commit
d3883c4428
@ -294,6 +294,84 @@ def test_line_clamp_number(assert_pixels):
|
||||
''')
|
||||
|
||||
|
||||
def test_line_clamp_nested(assert_pixels):
|
||||
assert_pixels('''
|
||||
BBBB__BB__
|
||||
BBBB__BB__
|
||||
BBBB__BB__
|
||||
BBBB__BB__
|
||||
BBBBBBBBBB
|
||||
BBBBBBBBBB
|
||||
__________
|
||||
__________
|
||||
__________
|
||||
__________
|
||||
''', '''
|
||||
<style>
|
||||
@page {size: 10px 10px;}
|
||||
@font-face {src: url(weasyprint.otf); font-family: weasyprint}
|
||||
div {
|
||||
color: blue;
|
||||
font-family: weasyprint;
|
||||
font-size: 2px;
|
||||
line-clamp: 3 "(…)";
|
||||
}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
aa a
|
||||
<p>
|
||||
bb b
|
||||
cc c
|
||||
dddd
|
||||
eeee
|
||||
ffff
|
||||
gggg
|
||||
hhhh
|
||||
</p>
|
||||
</div>
|
||||
''')
|
||||
|
||||
|
||||
def test_line_clamp_nested_after(assert_pixels):
|
||||
assert_pixels('''
|
||||
BBBB__BB__
|
||||
BBBB__BB__
|
||||
BBBB__BB__
|
||||
BBBB__BB__
|
||||
BBBBBBBBBB
|
||||
BBBBBBBBBB
|
||||
__________
|
||||
__________
|
||||
__________
|
||||
__________
|
||||
''', '''
|
||||
<style>
|
||||
@page {size: 10px 10px;}
|
||||
@font-face {src: url(weasyprint.otf); font-family: weasyprint}
|
||||
div {
|
||||
color: blue;
|
||||
font-family: weasyprint;
|
||||
font-size: 2px;
|
||||
line-clamp: 3 "(…)";
|
||||
}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
aa a
|
||||
<p>
|
||||
bb b
|
||||
</p>
|
||||
cc c
|
||||
dddd
|
||||
eeee
|
||||
ffff
|
||||
gggg
|
||||
hhhh
|
||||
</div>
|
||||
''')
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
def test_ellipsis_nested(assert_pixels):
|
||||
assert_pixels('''
|
||||
|
Loading…
Reference in New Issue
Block a user