Thanks to visit codestin.com
Credit goes to github.com

Skip to content

max-height and max-width ignored #3612

@gregreen

Description

@gregreen

In cards with large images, the CSS max-height and max-width property are effectively overridden by the way AnkiDroid handles large images (see here). For example, if the card template specifies

img {
  max-height: 120px;
}

for a very large image, AnkiDroid's automatic image rescaling overrides max-height, setting the image width/height to whatever AnkiDroid's built-in maximum size is, rather than what the user specified. This happens even if 120px is less than the maximum height, potentially causing the final image to be taller than 120px.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions