Skip to content

Explore the need for height/width on inlined SVG's #137

Description

@crgeary

I made a PR (#136) to fix issue #123 which essentially consisted of removing the height/width from the inlined SVG element. According to this CSS Tricks article on SVGs the width/height attributes are not useful for scaling inline SVGs, and instead we should set the aspect ratio with viewBox.

The 2 solutions that I can think of would be:

  1. Manually remove width & height attributes from the SVG files.
  2. Use a gulp task to remove width & height attributes on build.

The gulp inline package that we're using supports SVG transformations via options. I would guess, this is something that would help, but I'm not sure.

I see this being similar to #104 so solving one may solve the other 🤞

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions