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.
Radix base theme and default starterkit theme creates html class attribute .img-thumbnail
for all images without an option to turn it on/off for different view modes or display modes. This renders all images with a border and rounded corners regarding the respective css. While this can be changed for your individual subtheme of course by yourself, I think it is bad practise for a default setting and should be avoided.
Comment | File | Size | Author |
---|---|---|---|
#6 | radix-img-class-3082593-6.patch | 387 bytes | shadcn |
Comments
Comment #2
dqdComment #3
tstermitzI agree. This requires me to apply overrides to kill the thumbnail styling. It should be a choice, not a default.
Comment #4
shadcn CreditAttribution: shadcn at Chapter Three commentedThe idea was to have this match Bootstrap images out of the box but I understand why this is not the best choice for a Drupal theme. I've had to override this in almost all projects too.
Let's make this optional.
Comment #5
stefan.kornI do also agree on this.
I see in https://git.drupalcode.org/project/radix/blob/8.x-4.x/src/components/ima... that there is a setting "responsive" that can avoid the "img-thumbnail" class and turn it to "img-fluid". But there is no UI way to set this flag. I currently set this via preprocess_hooks for certain display variants. Maybe it would just be better to have the "img-fluid" class as default and the "img-thumbnail" class as optional via parameter.
Comment #6
shadcn CreditAttribution: shadcn at Chapter Three commented@stefan.korn Would something like this should take care of it?
Comment #7
stefan.kornFrom my point of view, this would be good option.
It would result in having class "img-fluid" on all images by default (https://getbootstrap.com/docs/4.3/content/images/). This means CSS "max-width:100% and height:auto", which imho is a good thing for responsive websites.
Comment #9
shadcn CreditAttribution: shadcn at Chapter Three commentedThanks Stefan. This is now committed.