#2372 closed defect (bug) (fixed)
Improve table styling in handbooks
Reported by: | grapplerulrich | Owned by: | pento |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Handbooks | Keywords: | |
Cc: |
Description
The styling for the tables in the new handbook theme can be improved.
https://make.wordpress.org/themes/handbook/review/required/theme-tags/
Attachments (3)
Change History (14)
This ticket was mentioned in Slack in #themereview by grapplerulrich. View the logs.
8 years ago
#4
@
8 years ago
The issue is that o2's CSS selectors are a bit to strict. The styles are only applied to article.post .entry-content table
which a handbook page doesn't have. This is how it would look with the default styles: https://cloudup.com/cPMXjDAFNL3
#5
@
8 years ago
The source code for the parent theme and child theme can be found here
Parent: https://wpcom-themes.svn.automattic.com/p2-breathe/
Child: https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/
#6
@
8 years ago
I guess you've added the style I've pasted on the slack channel, just for the record I added:
table { /* tables still need 'cellspacing="0"' in the markup */ border-collapse: separate; border-spacing: 0; border:1px solid #eee; } caption, th, td { font-weight: 400; text-align: left; } td{ border-bottom:1px solid #eee; padding: 10px } td:first-of-type{ width: 30%; border-right: 1px solid #eee; } tr:last-of-type td{ border-bottom: 0; }
Based on the inspector fiddle.
#7
@
8 years ago
I've seen that you've added thead{background:#eee;}
to the mix, but since there is a 'Subject tags' sub header, it would be good that that is styled as well:
table { /* tables still need 'cellspacing="0"' in the markup */ border-collapse: separate; border-spacing: 0; border:1px solid #eee; } thead{ background: #eee; } caption, th, td { font-weight: 400; text-align: left; } td{ border-bottom:1px solid #eee; padding: 10px } td[colspan="2"] { background: #eee; } td:first-of-type{ width: 30%; border-right: 1px solid #eee; } tr:last-of-type td{ border-bottom: 0; }
Screenshot is attached below.
#8
@
8 years ago
- Owner set to pento
- Resolution set to fixed
- Status changed from new to closed
In 4716:
@
8 years ago
Removed unnecessary 0px and added background for the td[colspan="2"] table data selector
#9
@
8 years ago
I know you've closed this, but since no patch was provided, nothing was fixed in the handbooks tables, so I submitted a patch that will make the table look like the one in the image I've attached.
We have okay looking tables on make/polyglots, but they're generated separately. Probably worth bringing over that style or one similar.