egoist/vue-content-loader

Wrong height

leolux opened this issue ยท 4 comments

The height of the rendered component is higher than the height set with :height="200"

jsgv commented

Experiencing the same.
Setting the height to same size of window window.innerHeight

This was an issue for me when the loader was too wide for the parent container

width and height props are used to set the SVG viewBox ratio, it does not hard code the dimensions on the element currently. I think in some cases it might be great to have different values.

My suggestion would be to get closer to what react-content-loader does:

  • Keep width and height props but without default values, apply them as width and height attributes on the root SVG element if not empty
  • Add a viewBox prop to be applied on the root SVG element, defaults to 0 0 {width} {height} like it is now (if no width or height is specified, use 400โœ—130).

๐ŸŽ‰ This issue has been resolved in version 2.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€