-
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
Conversation
} | ||
|
||
.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 comment
The 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 comment
The 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 comment
The 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 comment
The 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 comment
The 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.
25e0839
to
72d6d7c
Compare
I'm not sure about having the table header's border be dashed like that. Having that border be lighter than the others makes it look like the header is sort of "spilling over" into the first row, which is probably not what we want. Can you switch them up, have the general borders be dashed but the header border be solid? |
72d6d7c
to
de97464
Compare
Yeah, that looks nice! Is that the current state of the PR now? |
@@ -407,31 +407,27 @@ h4 > code, h3 > code, .invisible > code { | |||
|
|||
.content table:not(.table-display) { | |||
border-spacing: 0 5px; |
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!
|
||
.docblock table { | ||
border: 1px solid; |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Cells have borders, it'd be a duplicate.
} | ||
.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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent to have a "double" border.
I'm super confused, @GuillaumeGomez. There is a |
Yes. @killercup: Hum... I didn't see that until you pointed me but it still doesn't bother me. If more people agree with you, I'm fine with making/accepting this change though. |
Ping from triage! What's the status of this? |
Need to update it. |
Let's get this in then. @bors: r=QuietMisdreavus |
📌 Commit de97464 has been approved by |
Greatly improve tables display in docs Fixes #51454. r? @QuietMisdreavus Before: <img width="1440" alt="screen shot 2018-06-10 at 22 43 52" src="https://user-images.githubusercontent.com/3050060/41206138-cc61b2b4-6cff-11e8-9b6f-0b1e435d4b1b.png"> After: <img width="1440" alt="screen shot 2018-06-10 at 23 33 16" src="https://user-images.githubusercontent.com/3050060/41207049-d455c03c-6d0e-11e8-968f-d4fccaeb4265.png">
☀️ Test successful - status-appveyor, status-travis |
Fixes #51454.
r? @QuietMisdreavus
Before:
After: