Unverified Commit 09baca03 authored by Isaac Abotsi's avatar Isaac Abotsi Committed by GitHub

docs: add note for Image responsive layout (#25915)

With the default Next.js template project, the .main and .container divs have `display: flex` style rule. However, as commented in [this issue](https://github.com/vercel/next.js/issues/18489#issuecomment-857146988), if may not display properly an <Image /> placed as direct child.



## Documentation / Examples

- [x] Make sure the linting passes
parent caaa1be5
...@@ -100,6 +100,7 @@ but maintain the original dimensions for larger viewports. ...@@ -100,6 +100,7 @@ but maintain the original dimensions for larger viewports.
When `responsive`, the image will scale the dimensions down for smaller When `responsive`, the image will scale the dimensions down for smaller
viewports and scale up for larger viewports. viewports and scale up for larger viewports.
Note: the responsive layout may not work correctly if the parent element uses a display value other than `block` such as `display: flex` or `display: grid`.
When `fill`, the image will stretch both width and height to the dimensions of When `fill`, the image will stretch both width and height to the dimensions of
the parent element, provided the parent element is relative. This is usually paired with the [`objectFit`](#objectFit) property. the parent element, provided the parent element is relative. This is usually paired with the [`objectFit`](#objectFit) property.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment