-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Table styles output: collapse or to not collapse? #5575
Comments
All HTML-oriented editors which support styling table cell borders (this will be just two... CKEditor 4 and TinyMCE) that I checked currently don't handle this well. If you try to change the borders of the middle cell to blue, only this At the same time, I can't remember people going mad about this. Why? Because by default in CKEditor 4 we have separate borders. Which, I agree, looks heavy and old. And just unnecessary – table is a table, a grid. Not a "set of cells" like the default browsers styles show it. That's no option for us to have separate styles by default. Therefore, what I'd do:
|
I agree, no one uses tables with separate cell borders (
I'm also for whatever is most compatible with the pasted content from GDocs/MS Word. |
That's tricky. GDocs/MSWord do actually set the adjacent cells' borders to have them rendered correctly in HTML. We can allow pasting that, but I don't think we should work on making our UI doing the same thing as it increases the complexity by... a lot :D |
So we're left with |
https://codesandbox.io/s/objective-haibt-ibx59 This is my POC of how we can replace borders for box-shadow hacks (just in case we need this in the future). |
What worries me with anything different from |
Final decision: #5575 (comment) |
📝 Provide a description of a problem
We want to introduce styling tables in the #3287 which will include styling table cells' borders. Unfortunately, HTML/CSS does not have the best control over this when you wish to have collapsed borders.
With
boder-collapse: collapse
:border-bottom
of a cell above andborder-right
of a cell on the leftWith
border-collapse: separate
:To visuallise this:
setting |
same width:
1px
| blue border:2px
---|---|---
border-collapse:collapse
| |border-collapse:separate
| |border-collapse:separate
spacing:0
| |The problem is with
Are there any industry standards for sytling table cells' borders? The content paster from other sources would usually have border collapsed and styled borders of adjacent cells and only styled only bottom/right in styled cell (Google docs does both, tyles top,right,bottom,left of the current and bottom/right of adjacent top/left cell).
ps.: disabling border on the table for collapsed borders renders also the left border of first cell in a row:
The text was updated successfully, but these errors were encountered: