Opened 10 years ago
Closed 10 years ago
#28893 closed defect (bug) (fixed)
No margin bottom when the post type only has a title
Reported by: | markoheijnen | Owned by: | helen |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Editor | Keywords: | has-patch commit |
Focuses: | ui | Cc: |
Description (last modified by )
I was sure this was fixed in an earlier version but I saw it again.
You can reproduce it by registrering a post type with only the title and without the editor. Add a metabox to this post type and move it towards the title. You will then see that the metabox hits the title.
Attachments (8)
Change History (27)
#2
@
10 years ago
- Keywords has-patch removed
.edit-form-section
is used in multiple places and is meant to be a helper class, please do not remove it.
#3
follow-up:
↓ 4
@
10 years ago
- Description modified (diff)
- Keywords has-patch added
@michalzuber: I updated the ticket.
@helen: The class can be deleted as far as core goes. We use the class multiple times but edit.css is only used for this particular case. If you have a use case that I don't know about like a plugin that uses it then please tell.
#4
in reply to:
↑ 3
@
10 years ago
- Keywords has-patch removed
Replying to markoheijnen:
edit.css is only used for this particular case
I don't know what this means.
It was created specifically because we have hooks that are not metabox hooks but no good way to space them or sections within them evenly without developers having to inject CSS or, worse yet, use inline CSS. "Core must use it" is not how our CSS works now, and it is definitely not where we are going in the future - and not only that, core does use it. We are not deleting the class, period.
#5
follow-up:
↓ 9
@
10 years ago
Is this tone of voice really needed? I forgot about the action edit_form_after_editor
. Besides that the patch I provided is totally fine and fix the issue because wp-admin/css/edit.css
is only loaded on the edit post screen which only uses .edit-form-section
once.
I did added a second patch which solves the issue without breaking stuff. I do have to admin using a negative margin is ugly. Reason I did this was that otherwise you have to change to many values in the editor but I can be wrong about that.
That said I still think putting a margin-bottom on .edit-form-section
is wrong to do. If this is a helper class then it should not have different behaviours depending on the context of the page. You can use the class on the edit comment page but then you don't get the margin-bottom. To me that is weird but if that is intended behaviour then that is fine to me.
#6
@
10 years ago
Please do not read my "tone" in written words on the internet, Marko. edit.css
is not only loaded on the post edit screen. All CSS is still loaded everywhere. The class does not behave differently in different contexts.
#7
@
10 years ago
Helen was right, she knows a lot from the codebase :)
But I also checked the source and the .edit-form-section
class is used in 3 different php files.
wordpress-svn$ grep -ri 'edit-form-section' src src/wp-admin/css/edit.css:608:.edit-form-section { src/wp-admin/edit-form-advanced.php:493:<div id="postdivrich" class="postarea edit-form-section"> src/wp-admin/edit-form-comment.php:25:<div id="post-body-content" class="edit-form-section"> src/wp-admin/includes/media.php:2654: <div class="wp_attachment_details edit-form-section">
#8
@
10 years ago
- Keywords has-patch added
- Version changed from trunk to 3.6
28893.2.diff breaks edit_form_after_title
action: if you add a text input, it's hidden behind #postdivrich
.
28893.3.diff adds an empty .edit-form-section
div if editor is not supported, which doesn't break anything.
#9
in reply to:
↑ 5
@
10 years ago
Replying to markoheijnen:
You can use the class on the edit comment page but then you don't get the margin-bottom. To me that is weird but if that is intended behaviour then that is fine to me.
I could not reproduce that. As noted above, wp-admin.css
includes all styles, which means edit.css
is loaded on Edit Comment screen as well.
I can't reproduce it, please could you be more specific on which page or provide a screenshot?