spritespin icon indicating copy to clipboard operation
spritespin copied to clipboard

responsive behaviour depending on height

Open Lemmork opened this issue 6 years ago • 2 comments

Hi, thanks for this great plugin. Is it possible to use the responsive behaviour depending on the height of the wrapping element? For example if the wrapping element has a height of 40vh the spritespin overlaps the element.

Lemmork avatar Jan 28 '19 15:01 Lemmork

I also need this, is there a way to achieve this, with plugins/ overriding the existing responsive implementation?

@giniedp

oblivionbees avatar Mar 14 '21 14:03 oblivionbees

Please check out the beta version

  • https://spritespin-beta.ginie.eu/

The size of the outer container is now controlled by the developer. SpriteSpin tries then to fit in that container. You can control the algorithm with the fillMode option which behaves as object-fit css Property. https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit

I am working on examples and the documentation. Here are the major hints

  • width and height options are now completely optional.
  • there is a difference between display: inline-block and display: block. Try them both.
  • you probably want to use CSS max-height

Please tell me whether that solves your layout requirements or if there is anything that still can be improved

giniedp avatar Apr 05 '21 09:04 giniedp