WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26958 closed defect (bug) (duplicate)

Double <br> at Gallery end should be only one

Reported by: dway Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8
Component: Gallery Keywords:
Focuses: Cc:

Description

Hi,

It seems that when creating a gallery, it is rendered with a double <br style="clear:both"> at the end of <dl> list. There should be only one here.

Change History (6)

#1 @bcworkz
8 years ago

This does occur when the final row is completely filled. When partially filled, only one occurs. What we are seeing is the end of row break next to the end of gallery break. Since we need to ensure the entire gallery always ends with at least one break, a proper solution would either need to suppress the usual end of row break if it is the end of gallery, or always output the end of row break at the end of gallery, regardless if the row is filled or not.

#2 follow-up: @dway
8 years ago

  • Keywords 2nd-opinion added
  • Severity changed from normal to major

It could be better to do this with a simple CSS clearfix applied on the gallery container.
What do you think ?

#3 in reply to: ↑ 2 @bcworkz
8 years ago

Replying to dway:

What do you think ?

It doesn't really address the issue. The problem is the spacing to the next vertical element varies depending if the thumbnails fill the row or not. Clearfix will get rid of the need for the final break, so the spacing issue changes from 1 or 2 breaks to 0 or 1 break. We essentially need a final break in the last row whether it is filled or not. What part of the code it comes from doesn't matter much.

#4 @dway
8 years ago

Well, I think that if the br are all deleted from core code, the clearfix will take care of any situation for closing the gallery item's list, and the problem would be solved without adding this useless markup.

#5 @bcworkz
8 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #25537, which has a patch.

#6 @SergeyBiryukov
8 years ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Severity changed from major to normal
Note: See TracTickets for help on using tickets.