Skip to content

Conversation

@pszczesniak
Copy link
Contributor

@pszczesniak pszczesniak commented Jan 10, 2025

Suggested merge commit message (convention)

Type: Message. Closes #8412.


Additional information

This is not 100% super solid solution but some kind of a workaround for this problem.

Description:

In Tables the change were made from inline styles that were responsible for floating to CSS classes. That helped to add margin-inline-end with value of 2em to preserve the space when lists were next to the floating table. Also by this class there is a chance to set on the lists overflow: hidden and padding-inline-start (starting from the second nesting ONLY) when they are preceded by an element with CSS class mention earlier.

The only potential risk is the overflow: hidden, but regular user wont' be able to break anything - without specific CSS that could manipulate the content (like position: absolute and manipulating the top, left, right or bottom).


Before:
Screenshot 2025-01-10 at 14 58 48

After:
Screenshot 2025-01-10 at 14 57 33


⚠️ It's not working with Export to Word.

.ck-content .table-style-align-left ~ ul ol,
.ck-content .table-style-align-left ~ ol ol,
.ck-content .table-style-align-left ~ ol ul {
overflow: hidden;
Copy link
Member

@Reinmar Reinmar Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is risky. All overflow:hidden caused issues in the past.

Eg. if someone has bullets styled with some custom elements outside ol/ul, they will not show up.

@Reinmar
Copy link
Member

Reinmar commented Apr 16, 2025

One quick note: Apart from the issues with overflow:hidden, this solution won't handle scenarios like img+h1+ol :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table can overlap with List

3 participants