Skip to content

🐛 Fix: UI is not perfect at Hero Section #40288 #40316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abhisheksharmacodes
Copy link

#40288

Issue #40288 pointed out a UI fix for hero section stating that the image goes out of the screen. The changes has been made to fix this issue in file: responsive.amp.html

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@erwinmombay erwinmombay requested a review from Copilot June 9, 2025 19:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses issue #40288 by constraining the hero image and its container to prevent horizontal overflow.

  • Adds max-width and overflow: hidden to the figure and .content-container wrappers.
  • Updates the amp-img CSS and attributes to enforce responsive sizing with a fixed aspect ratio.
Comments suppressed due to low confidence (3)

examples/responsive.amp.html:148

  • The CSS rule height: auto; can override AMP's layout="responsive" aspect-ratio handling. Consider removing height: auto; so AMP maintains height based on the width and height attributes.
      height: auto;

examples/responsive.amp.html:152

  • Consider adding box-sizing: border-box; to .content-container to ensure its padding is included in the element's total width calculation and avoid unexpected overflow.
      padding: 15px;

examples/responsive.amp.html:149

  • [nitpick] Align the closing brace indentation with the opening rule to maintain consistent code style and improve readability.
    }

@erwinmombay
Copy link
Member

can you provide a before and after screenshot of what these changes are and how they affect hero images?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants