Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19604 closed defect (bug) (fixed)

Make the styles for misc-publishing-actions dynamic

Reported by: nacin's profile nacin Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: UI Keywords: has-patch
Focuses: Cc:

Description

The last of the three misc-publishing-actions (Status, Visibility, Publish immediately) need special styling, specifically the lack of a bottom border, to prevent it from doubling up with major-publishing-actions.

This is hardcoded to the Publish immediately div with the misc-pub-actions-last class. This is a problem when the post_submitbox_misc_actions hook is used.

Given that :last-child exists, this is lame. But we can't use :last-child since IE is lame.

The attached patch rearranges it as follows: When the Publish box is in the sidebar, the major-publishing-actions div is given a border that is the same as the background, and a negative top margin, to cover up the double margin. When the Publish box is in the left column, the borders are applied to the left, rather than the right, and first-child (supported down to IE7 in some respect) is used to remove the left border.

No UI actually changes.

Attachments (1)

19604.diff (4.0 KB) - added by nacin 13 years ago.

Download all attachments as: .zip

Change History (3)

@nacin
13 years ago

#1 @nacin
13 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20077]:

In miscellaneous publishing actions, use :last-child instead of a separate misc-pub-section-last class to control borders. Allows for sane use of the post_submitbox_misc_actions hook. (Actually uses :first-child for browser compat reasons.) fixes #19604.

#2 @nacin
13 years ago

#17679 was marked as a duplicate.

Note: See TracTickets for help on using tickets.