Certain types of SVG files in Nestable Nav Menu icons cannot be sized

I have already asked a question about it some time ago in “How to”.

Maybe it doesn’t qualify as a bug, but as a “feature”. But this feature makes the option of using SVG icons unusable in certain contexts: when the SVG has rectangles or other shapes with defined dimensions. I don’t see a way to size them (without editing the files), because they are rendered as inline SVG. Reducing the width/height hides parts of the SVG.

Examples of SVGs that are currently unusable as icons:

I guess the solution is to output them as files <img src='/example.svg'> and not inline.
This will also allow to cache the files.

Hey @AMX,

thanks for report.

However, this is not a Bricks bug. The SVG files are missing the viewBox attribute. After adding it everything works as expected (see demo).

Best,

André

1 Like

Thank you very much, André. Indeed.

In this case, it is a feature request, because outputting them as files would make it possible to cache them. Inlining does have some advantages, but also disadvantages.

Have a great weekend.