Opened 8 months ago
Last modified 3 months ago
#22086 new enhancement
HTML5 and cellspacing="0" in admin pages
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | 3.4 |
| Severity: | minor | Keywords: | has-patch needs-testing 2nd-opinion |
| Cc: | info@… |
Description
There are several instances where generated table content uses 'cellspacing="0"' in the admin areas of WordPress.
The W3C validator (albeit experimental) states that this parameter should be dropped and CSS used instead for HTML5 compliance.
I think the patch I'm going to attach in a moment will fix these validation issues.
Attachments (5)
Change History (14)
- Keywords ui-feedback removed
Actually, padding is not equivalent to cellspacing. You want border-collapse and border-spacing. If you look carefully, I think you'd find that removing padding like that results in lots of unwanted side effects. Additionally, you'll want to be sure to only apply the rules to table elements with those selectors, as things like .widefat can be used for all kinds of elements. Also, structural CSS should not go in color files but rather the wp-admin.css sheet.
@helenyhou,
I had border-collapse and border-spacing in the patch as well as the padding. I'll take your superior knowledge and remove the padding elements and move the CSS to the wp-admin.css file and submit a revised patch later.
The wp-admin.css file contains this:
/* .widefat - main style for tables */
So, does the styling for this need to be applied only to the HTML tag? Is the class being mis-used or is this documentation incorrect?
Updated patch with CSS moved into wp-admin.css. I just need to check how the CSS is minified. What service is used for this?
comment:6
in reply to:
↑ 5
SergeyBiryukov — 8 months ago
Replying to MattyRob:
I just need to check how the CSS is minified. What service is used for this?
There's no need to patch minified files, a post-commit bot takes care of it.
@SergeyBiryukov - thanks, didn't know that.
v4 patch seems to work better - appearance goes off a little with the first patch - top and bottom of tablets gets cropped.
comment:8
SergeyBiryukov — 8 months ago
- Version changed from trunk to 3.4

padding:0px 0px 0px 0px; should be padding: 0;. Same for other values.