Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
/ aspect-ratios Public archive

Issue with aspect ratios on responsive images with gatsby

License

Notifications You must be signed in to change notification settings

jonathangraf/aspect-ratios

Repository files navigation

Responsive aspect-ratio issue

The affected code is found in components/image.js

How to recreate the issue

  1. Build the site!

    The issue only shows in built-version of the website

    npm run build
  2. Serve the site

    npm run serve
  3. Open site

    Your site is now running at http://localhost:9000!

    Alternatively visit this site

    The issue shows when loading on a mobile device or a browser with a viewport-width smaller than 678px (the configuration of the media query).

    For reference look at the video below. It shows the image ratio as they should be, after reloading the issue is apparent immediatly.

    When inspecting the element, the aspect-ratio set with the padding-bottom is the ratio of the desktop version.

Demonstration

About

Issue with aspect ratios on responsive images with gatsby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published