Menu icon Foundation
block-grid with SVGs doesn't resize

Hey guys.

When using block-grid with SVGs in place of images for example. The SVGs don't resize to fit the <UL.
I think part of the issue is that svg files require an explicit width and height. Is this expected behavior?

Thanks.

svgblock-grid

Hey guys.

When using block-grid with SVGs in place of images for example. The SVGs don't resize to fit the <UL.
I think part of the issue is that svg files require an explicit width and height. Is this expected behavior?

Thanks.

Dylan Millikin about 4 years ago

Sorry the layout got messed up. it's supposed to read: The SVGs don't resize to fit the UL.

Dylan Millikin about 4 years ago

anyone?

Rafi Benkual about 4 years ago

How are using the SVG? Inline? with an img tag?

Works with img tag by default because images are set to width: 100%
http://codepen.io/rafibomb/pen/GJxvBv?editors=110

Otherwise you need to specify

svg {
  max-width: 100%;
}

Dylan Millikin about 4 years ago

Thanks Rafi I'll give this a spin.