-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Greatly improve tables display in docs #51482
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -407,31 +407,27 @@ h4 > code, h3 > code, .invisible > code { | |
|
||
.content table:not(.table-display) { | ||
border-spacing: 0 5px; | ||
border-collapse: separate; | ||
} | ||
.content td { vertical-align: top; } | ||
.content td:first-child { padding-right: 20px; } | ||
.content td p:first-child { margin-top: 0; } | ||
.content td h1, .content td h2 { margin-left: 0; font-size: 1.1em; } | ||
.content tr:first-child td { border-top: 0; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this line do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prevent to have a "double" border. |
||
|
||
.docblock table { | ||
border: 1px solid; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry to be difficult. It is just good to see tables improving 😄. Is a solid border around the table not nice to have? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cells have borders, it'd be a duplicate. |
||
margin: .5em 0; | ||
border-collapse: collapse; | ||
width: 100%; | ||
} | ||
|
||
.docblock table td { | ||
padding: .5em; | ||
border-top: 1px dashed; | ||
border-bottom: 1px dashed; | ||
border: 1px dashed; | ||
} | ||
|
||
.docblock table th { | ||
padding: .5em; | ||
text-align: left; | ||
border-top: 1px solid; | ||
border-bottom: 1px solid; | ||
border: 1px solid; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice if there still was some way to differentiate between the header and normal rows. How about a 2px line at the bottom of the header? Or to just keep a dashed line between the normal rows? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Super nitpick-y, but I'd probably change the general border color to have less of a contrast with the background, and then keep the current color for the thead's border-bottom There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure playing with colors will render well... I'll try but I don't much expectations from it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 for thickening the border below the header. I can go either way about changing the border color. |
||
} | ||
|
||
.fields + table { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this line is necessary any more with
border-collapse: separate
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh true!