Stackable icon indicating copy to clipboard operation
Stackable copied to clipboard

Hero Block - Not displaying responsively on different screen sizes

Open malalacharm opened this issue 6 months ago • 1 comments

Describe the bug When resizing, on smaller screens, background image do not resize properly and get cropped inside columns.

To Reproduce Steps to reproduce the behavior:

  1. Add a new page
  2. Add a Hero Block
  3. Add a Background Image
  4. See error

Expected behavior Hero image should scale proportionally within the column.

Screenshots Image

Image

malalacharm avatar Jun 17 '25 12:06 malalacharm

The cropping of background image is the default behavior, which can be also observed in core/cover. To achieve scaling without cropping, we can explicitly set it using this custom CSS.

.stk-block-hero .stk--has-background-overlay {
	background-size: contain;
	background-repeat: no-repeat;
	box-shadow: none;
}

Arukuen avatar Oct 13 '25 02:10 Arukuen