WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#23244 closed defect (bug) (fixed)

Twenty Twelve: add clear: both; to aligncenter class

Reported by: alexvorn2 Owned by: lancewillett
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.5
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

img.aligncenter {
    margin-bottom: 0.857143rem;
    margin-top: 0.857143rem;
}

to

img.aligncenter {
    margin-bottom: 0.857143rem;
    margin-top: 0.857143rem;
    clear: both;
}

Attachments (1)

style.css.diff (501 bytes) - added by alexvorn2 2 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 @DrewAPicture2 years ago

  • Cc DrewAPicture added

@alexvorn2: Seems to be working fine without it. Wouldn't have a problem with testing it if you'd like to submit a patch.

@alexvorn22 years ago

comment:2 @lancewillett2 years ago

I vote to close as wontfix unless alexvorn2 you can give a bit of the "why" it's needed.

See these tips for providing a useful bug report: http://codex.wordpress.org/Reporting_Bugs

comment:3 @alexvorn22 years ago

because when adding two images: first one with float left and the second with float center you will get this - http://wpimpact.com/wp-content/uploads/2013/01/images_WPImpress_20130121_201840.png

docs:
http://www.w3schools.com/cssref/pr_class_clear.asp

comment:4 @alexvorn22 years ago

previous themes: Twenty Eleven and Twenty Ten have clear: both;

I thought I will get understood very easily from what I posted before.

Clear: both help a little in arranging the element to fit in the column.

See what happens when I applied the fix: http://wpimpact.com/wp-content/uploads/2013/01/images_WPImpress_20130121_202720.png

comment:5 @MikeHansenMe2 years ago

I was able to reproduce this as well. The patch is about as simple as it gets. +1

comment:6 follow-up: @lancewillett2 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.6
  • Type changed from enhancement to defect (bug)

Screenshots and explanation are very helpful -- thanks. :)

In the patch we'd only apply to .aligncenter selector, though, probably.

comment:7 in reply to: ↑ 6 @alexvorn22 years ago

Replying to lancewillett:

Screenshots and explanation are very helpful -- thanks. :)

In the patch we'd only apply to .aligncenter selector, though, probably.

We can apply to "alignnone" too.

comment:8 @lancewillett2 years ago

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

In 23428:

Twenty Twelve: clear center-aligned images properly. Fixes #23244.

Note: See TracTickets for help on using tickets.