Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a follow up of this issue: #1322794: Make Stark use a responsive layout
During testing with Images I found an issue, that the Drupal default Imagecache preset "Large", which is used to show an image in an Article Node, is too wide to be shown in narrow and mobile layout. This could add a horizontal scrollbar on smartphones which is not the idea of a responsive design.
The attached patch just changes the max-width of all images too 100% which then automatically resizes images depending of the available space.
Comment | File | Size | Author |
---|---|---|---|
#9 | images_fluid-1490468-9.patch | 443 bytes | Schnitzel |
#1 | images_100-1490468-1.patch | 441 bytes | Schnitzel |
Comments
Comment #1
Schnitzel CreditAttribution: Schnitzel commentedComment #3
Snugug CreditAttribution: Snugug commentedYou also are going to need to set height to auto in order to ensure that the height scales correctly as well
Comment #4
Schnitzel CreditAttribution: Schnitzel commentedwell that's in the patch but I just did not write it because the 100% width is more important ;)
Patch failed because the former patch is actually not yet in, it would probably also fail if I do it for the right paths. Let's wait until #1322794: Make Stark use a responsive layout is in.
Comment #5
alanburke CreditAttribution: alanburke commented#1: images_100-1490468-1.patch queued for re-testing.
Comment #6
JohnAlbinOur coding standards (rough as they are) use a space after the semicolon. Like this:
property: value
Comment #7
JohnAlbinOnce all our themes are converted to be responsive, we should move this to a system CSS file. But that would break Bartik and Seven in the interim. We'll need to create a follow-up issue for that.
Comment #8
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedAnd also the properties should be in alphabetical order. Drupal CSS coding standards.
Comment #9
Schnitzel CreditAttribution: Schnitzel commentedthx for your reviews, here a fixxed version:
- new order
- added space
Comment #10
dcmouyard CreditAttribution: dcmouyard commentedThe patch in #9 looks good to me.
Comment #11
Tor Arne Thune CreditAttribution: Tor Arne Thune commentedYes, looks good!
Comment #12
catchLooks good. Committed/pushed to 8.x.