Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CSS Table Module Level 3 to compute widths #2087

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

kygoh
Copy link
Contributor

@kygoh kygoh commented Mar 5, 2024

CSS Table Module Level 3 appears to respect table width over cell width. Thus, the following 3 test_layout_table_auto_9 and test_layout_table_auto_32 tests which increase table widths fail:

==================================================================== short test summary info =====================================================================
FAILED tests/layout/test_table.py::test_layout_table_auto_9 - assert 53.33333333333333 == 60
FAILED tests/layout/test_table.py::test_layout_table_auto_10 - assert 6.666666666666666 == 6
FAILED tests/layout/test_table.py::test_layout_table_auto_32 - assert 500.0 == 600
===================================================== 3 failed, 2189 passed, 39 xfailed in 323.50s (0:05:23) =====================================================

This appear to be able to fix #1956

@liZe liZe added the bug Existing features not working as expected label Mar 5, 2024
@kygoh
Copy link
Contributor Author

kygoh commented Mar 5, 2024

CSS Table Module Level 3 appears to respect table width over cell width.

From 3.9.2.1. Rules:

Rule 3: The sum of width assgined to all columns should be equal to the assignable table width.

@kygoh kygoh marked this pull request as ready for review March 6, 2024 00:31
@liZe
Copy link
Member

liZe commented Mar 6, 2024

Thanks a lot for taking the time to dive into the spec!

@liZe liZe merged commit 3eaadd0 into Kozea:main Mar 6, 2024
6 checks passed
@liZe liZe added this to the 62.0 milestone Mar 6, 2024
@kygoh kygoh deleted the css-tables-3-width branch March 6, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table not printed as shown in browser: weasyprint overrides "table width" with "cell width"
2 participants