airbnb / airbnb/babel-plugin-inline-react-svg

viewbox is not passed from svg to html in the babel-plugins-inline-react-svg version": "^2.0.1".

Open
#110 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
474
Forks
90
PR merge metrics
No merged PRs in 30d

Description

There is an examlpe of svg file:

```

```

I expect that in html this file will look the same. But the viewBox attribute is lost in html. The code looks like this:

```

```

There was no such problem in version 1.1.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the transformation with the supplied SVG and compare the generated HTML between versions 1.1.2 and 2.0.1. Start by locating the plugin's SVG-to-React transformation entry point; done means the generated SVG preserves the viewBox attribute and matches the source dimensions and rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript, react
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.