Skip to content
This repository was archived by the owner on Jun 26, 2018. It is now read-only.

Conversation

@ygannett
Copy link
Contributor

@ygannett ygannett commented Jan 23, 2018

Description

The container for video, .ma__video, and iframe, .ma__iframe, didn't have the styles which other content container in the main column have:

    margin-left: auto;
    margin-right: auto;
    padding-right: 500px;

This was causing to iframe and video to stretch to fill its parent container when the side column content is not available.

Those missing styles are added to .ma__video and .ma__iframe to maintain the same width as other content in the main column.

Related Issue / Ticket

Steps to Test

Note: Even the change is made in Mayflower, you don't see it in the sample pages set up in Mayflower. You need to test it in Drupal.

  1. Build the site with the tag, 5.10.1-alpha-67124.
  2. Create a service detail page with video, iframe and some sections. Do not add any side content. You can use 'mass.local/service-details/massachusetts-traffic-map/' as a sample and add video.
  3. Go to the generated page and see the video and iframe have the same width as other section content. In another words, they are lined up on the right side along with other section content, no sticking out. See below screenshot, After.
  4. When you inspect .ma__iframe, you'll find the following styles:
.main-content--full .page-content > .ma__iframe {
    margin-left: auto;
    margin-right: auto;
    padding-right: 500px;
}

dp-7490_iframe-css

  1. When you inspect .ma__video, you'll find the following styles:
.main-content--full .page-content > .ma__video {
    margin-left: auto;
    margin-right: auto;
    padding-right: 500px;
}

dp-7490_video-css

Note:
Videos are adjusted to fit in the given space for their widths and heights, but iframe are not. When the linked content (the page in the iframe) is bigger than the .ma__iframe (= iframe size), users need to use iframe's scroll bars to see overflow content. This is the same condition seen in mobile in the current production.

Screenshots

Before
dp-7490_before

After
massachusetts_traffic_map___mass_gov

Additional Notes:

Anything else to add?

Impacted Areas in Application

@todo

Today I learned...

Copy link
Contributor

@mrossi113 mrossi113 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR has passed ER! 👍

@yriahi yriahi self-requested a review February 22, 2018 18:50
Copy link

@yriahi yriahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yriahi yriahi merged commit e6e98b1 into dev Feb 22, 2018
@yriahi yriahi deleted the DP-6712_iframe-video-width branch February 22, 2018 18:53
@clairesunstudio clairesunstudio mentioned this pull request Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants