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

Fix truncate tables in printing mode while using export to pdf #16855

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/ckeditor5-table/theme/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@
}
}

/**
* Expanding the table to the full height of the parent container is necessary because tables
* are rendered inside <figure> elements, which is kinda buggy in table height calculation.
* While setting `height: 100%` fixes the issue in the editing mode described here:
* https://github.com/ckeditor/ckeditor5/issues/6186
*
* it's causing another issue with the table height in the print preview mode here:
* https://github.com/ckeditor/ckeditor5/issues/16856
*
* For now, resetting the height to `initial` in the print mode works as a workaround.
*/
@media print {
.ck-content .table table {
height: initial;
}
}

/* Text alignment of the table header should match the editor settings and override the native browser styling,
when content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */
.ck-content[dir="rtl"] .table th {
Expand Down