Skip to main content

Widget CSS: Use min-height in Your Widget Styling

Setting a min-height is a smart way to:

  • Prevent layout collapse when content is limited (e.g., only one performance listed).

  • Maintain a visually consistent space, even when the widget doesn't fully populate.

  • Improve responsiveness across screen sizes by letting the widget grow as needed—but never shrink too small.


šŸ› ļø Sample CSS Snippet

cssCopyEdit.ots-widget-min-height { min-height: var(--onstage-widget-min-height, 20vh); }

This sets a custom minimum height of 20vh, but still respects any higher value passed in via --onstage-widget-min-height.


šŸ”— Learn More

Want to dig deeper? Read the official W3Schools guide on min-height.

Did this answer your question?