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.

CommentFileSizeAuthor
#6 radix-img-class-3082593-6.patch387 bytesshadcn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

diqidoq created an issue. See original summary.

dqd’s picture

Issue summary: View changes
tstermitz’s picture

I agree. This requires me to apply overrides to kill the thumbnail styling. It should be a choice, not a default.

shadcn’s picture

Assigned: Unassigned » shadcn
Status: Active » Needs work

The 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.

stefan.korn’s picture

I 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.

shadcn’s picture

Status: Needs work » Needs review
FileSize
387 bytes

@stefan.korn Would something like this should take care of it?

stefan.korn’s picture

From 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.

  • arshadcn committed fe385e8 on 8.x-4.x
    Issue #3082593 by arshadcn, diqidoq, stefan.korn, tstermitz: Radix...
shadcn’s picture

Status: Needs review » Fixed

Thanks Stefan. This is now committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.