Ckeditor5: The table in the migration guide is cropped

Created on 18 Apr 2019  路  7Comments  路  Source: ckeditor/ckeditor5

bug docs

All 7 comments

I guess this needs to be fixed in the styles. So cc @dkonopka.

Code block inside table breaks it, we are missing here white-space: normal.

Screenshot 2019-04-29 at 11 23 01

@dkonopka the problem with changing white-space for code element is that it will change its formatting:

code snippet with no indentation

mby scroll overflow? 馃 just like we do for other wider code listings?

Overflow visible in the CKE5 Content Security Policy guide

@mlewand It's not so easy to set overflow-x: scroll, because then we need to set some max-width of this element which stretch <table>.

That's why I decided to go with white-space: normal even if it changes code formatting. I see this is the first<code> inside <table>, so IMHO we can live with this changed code format.

But....it's possible to change table-layout: fixed then <code> looks good, but the column width is not as perfect as it should be.

Screenshot 2019-05-21 at 13 45 53

Why does its width exceed the parent constraints in the first place? 馃 I think this is the issue that contributes to the problem.

I'm afraid that table-layout: fixed is a no-go option. Just imagine it will apply fixed, equal widths to each single table in our docs. The default layout strategy seems to make more sense than that.

If we can't come up with a reasonable reusable solution, I'm ok with simply hand correcting the code listing in this particular doc as a workaround.

As I can see, the table here is a plain html, so we can easily add extra CSS class (or inline style) and it will be working only for this table. I know it's not the best idea, but it could work. WDYT?

Oh, in this case it's totally fine 馃憤 If it's for this table only, and just please fine-tune the first cell width, so that it has same width as now (with the default strategy).

The more width in second cell the less lines it will contain 馃檪

Was this page helpful?
0 / 5 - 0 ratings