Skip to content

CSS Class for Thumbnails/Images with fixed Height #152

Description

@michaelweinold

Context

When using multiple separate grids with images, it is currently not possible to ensure all {grid-item-card} items have the same height. Instead, the row of the {grid-item-card} items is determined by the image with the largest height:

257420509-77b06221-49aa-4117-b4c6-d43d239f1111

However, there is already a CSS class "Avatar" (sd-avatar-), defined in style/_icons.scss. This allows for {grid-item-card} items with uniformly sized avatar images.

See also my discussion in the Executablebooks repo: sphinx-design multiple Grids with same Height

Proposal

I propose to add a CSS class "Thumbnail" that accepts a height parameter and, taking into account the height of the contained image, adds appropriate top/bottom padding to stretch the {grid-item-card} item to the target height.

Tasks and updates

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions