Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#42118 closed defect (bug) (fixed)

Twenty Seventeen: Double bottom-margins appear below embeds

Reported by: westonruter Owned by: davidakennedy
Priority: normal Milestone: 4.9
Component: Bundled Theme Version: 4.7
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

There is some CSS in Twenty Seventeen to make sure embeds and iframes fit their containers:

embed,
iframe,
object {
        margin-bottom: 1.5em;
        max-width: 100%;
}

However, in the case of an oEmbed where a video appears inside of its own paragraph the result is a double margin between the iframe and the next paragraph. The margin should only be added if the iframe is the only child of the parent element.

This is a problem both for videos in post content and for videos embedded into the Text widget via #40854.

Attachments (2)

extra-margin.png (606.5 KB ) - added by westonruter 9 years ago.
42118.0.diff (520 bytes ) - added by westonruter 9 years ago.

Download all attachments as: .zip

Change History (6)

@westonruter
9 years ago

#1 @westonruter
9 years ago

  • Keywords has-patch added
  • Owner set to westonruter
  • Status newreviewing
  • Version4.7

#2 @westonruter
9 years ago

  • Owner changed from westonruter to davidakennedy

#3 @davidakennedy
9 years ago

Tested this. I can confirm the bug, and the patch looks good to me. Thanks @westonruter!

#4 @davidakennedy
9 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 41888:

Twenty Seventeen: Fix double bottom-margins below embeds

Corrects an issue where both the containing paragraph and embed had bottom margins, causing unwanted extra space.

Props westonruter.

Fixes #42118.

Note: See TracTickets for help on using tickets.