WordPress.org

Make WordPress Core

Opened 9 days ago

Last modified 7 days ago

#50766 new defect (bug)

Not enough padding on "Warning: these page should not be the same!"

Reported by: SergeyBiryukov Owned by:
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Administration Keywords: good-first-bug has-screenshots has-patch
Focuses: ui, css Cc:

Description (last modified by SergeyBiryukov)

  1. Go to Reading Settings.
  2. Assign the same page as Homepage and Posts page.
  3. You'll see the two messages: "Settings saved" and "Warning: these page should not be the same!".
  4. The first message has enough padding, while the second one does not.

This is caused by generic form table styles:

.form-table td p {
    margin-top: 4px;
    margin-bottom: 0;
}

taking precedence over

div.error p {
    margin: 0.5em 0;
    padding: 2px;
}

Adding a notice class to the message fixes the issue.

Note: This also applies to "Warning: these pages should not be the same as your Privacy Policy page!" directly below.

Attachments (1)

50766.png (18.4 KB) - added by SergeyBiryukov 9 days ago.

Download all attachments as: .zip

Change History (5)

@SergeyBiryukov
9 days ago

#1 @SergeyBiryukov
9 days ago

  • Description modified (diff)

#2 follow-up: @man4toman
8 days ago

In addition, I think inline class name is not required here.
It can be: class="notice error"

#3 in reply to: ↑ 2 @musicaljoeker
7 days ago

Replying to man4toman:

In addition, I think inline class name is not required here.
It can be: class="notice error"

I think if you take away the inline class, it will put the warning at the top of the page. I'm assuming the intended design is to warn at the location where the questionable action was taken.

This ticket was mentioned in PR #438 on WordPress/wordpress-develop by musicaljoeker.


7 days ago

  • Keywords has-patch added; needs-patch removed

…same!" warning

Adding the notice class to the warning fixes this problem.

Props SergeyBiryukov, man4toman.
Fixes #50766

Added the notice class to the Reading Settings front-page-warning.

Trac ticket: https://core.trac.wordpress.org/ticket/50766

Note: See TracTickets for help on using tickets.