-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
.markdown-body table styling #1127
Comments
@pbb72 Hello Peter. It looks like the @simurai I wonder if changing from |
👍 Yeah, right. We tried to remove
Yes, it seems that a combo of |
That looks like a good solution. Curiously, just having the following (no width-related rules at all) also seems to do the trick:
But I am not skilled enough in grids yet to see if that could cause other problems... |
Not sure either. 🤔 Using grid should have enough browser support by now, but maybe still nice to keep the |
Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days. |
Describe the bug
The styles that are being applied to tables within
.markdown-body
are not doing what they seem to be meant to do, and are hindering layout with table borders.Tables are given both a
display: block
and awidth: 100%
:css/src/markdown/tables.scss
Lines 3 to 7 in e3d988a
I am not sure if these rules were supposed to fix anything, or if they are just the result of bad testing. The
width
rule would have made sense if the table was still a table, but it does not here asblock
defaults to full width already. Forcing the table to display asblock
breaks the table layout, as the containing elements (namelytbody
) still render as table elements.To Reproduce
Steps to reproduce the behavior:
On GitHub, create a document in a markup language that allows adding table borders, for example
.wiki
Create a table with a border:
See error, the border spans the whole document width, but the table contents sits to the left.
Expected behavior
The border should wrap nicely around the table
Screenshots
![image](https://user-images.githubusercontent.com/1436366/88189838-ccd5fe80-cc39-11ea-9232-cb4917e416b3.png)
Actual result:
Expected result: either
![image](https://user-images.githubusercontent.com/1436366/88189959-f858e900-cc39-11ea-9961-dbb1031bbb34.png)
![image](https://user-images.githubusercontent.com/1436366/88189994-0444ab00-cc3a-11ea-9e99-e81ed7eb6ad8.png)
or
Suggested fix:
At the very least, remove the
display: block
rule, and if possible also thewidth
rule.The text was updated successfully, but these errors were encountered: