Opened 9 years ago
Closed 8 years ago
#30830 closed defect (bug) (wontfix)
Remove unnecessary space after class="postbox when postbox_classes returns an empty string in metaboxes
Reported by: | ShinichiN | Owned by: | |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | trivial | Version: | 3.0 |
Component: | Administration | Keywords: | |
Focuses: | ui | Cc: |
Description
When the postbox_classes() function returns an empty string, we have an unnecessary space after postbox.
<div id="submitdiv" class="postbox " >
<div id="formatdiv" class="postbox " >
<div id="postimagediv" class="postbox " >
This patch gives no unnecessary space when postbox_classes returns an empty string.
Attachments (1)
Change History (5)
#1
@
9 years ago
- Focuses administration added
- Priority changed from normal to lowest
- Severity changed from normal to trivial
#3
@
9 years ago
- Component changed from General to Administration
- Focuses ui added; administration removed
#4
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
There are several other places where core outputs a space after a CSS class, as noted by @nacin this could be fixed with additional code but for a little benefit. Does it harms having a space? What's the real benefit in trying to remove it? Sure, as a best practice these spaces should be avoided but I'd suggest to spend energies and time elsewhere rather than refactoring existing code for such small details.
Also, no traction in 13 months :) Closing out, please do feel free to reopen if you think it's really relevant.
We could remove the class after " and before > pretty easily, but look at how much code is required to make it without a space :)
Could we safely return 'postbox' from postbox_classes()? Is there ever a time where that should not be the case?
This has been this way for a while, going back to at least 3.0, probably 2.7.