Skip to content

Commit 53b5f9c

Browse files
committed
Improve ImageWithContent mobile responsiveness
- Enhance small screen image container styling - Add clarifying comments for mobile max-width handling - Ensure proper image scaling on mobile devices
1 parent 47fc31e commit 53b5f9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/ImageWithContent/ImageWithContent.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,15 @@ $image-default-width: 300px;
9595
// Small screen responsiveness (mobile phones)
9696
@include vars.below("small") {
9797
// Adjust image container for small screens
98+
// Ensure proper image scaling for small screens
9899
.image-with-content__image-container {
99-
// Use the mobile max width if specified, otherwise remove constraints
100+
// Use the mobile max width if specified,
101+
// otherwise remove constraints to allow full width
102+
// If --mobile-max-width is set it consists of pixel count and suffix px created by the ImageWithContent component.
100103
max-width: var(--mobile-max-width, none);
101104
margin: 0 auto;
102105
}
103106

104-
// Ensure proper image scaling for small screens
105107
.responsive-image__img {
106108
max-width: 100%;
107109
height: auto;

0 commit comments

Comments
 (0)