airbnb / airbnb/react-sketchapp
SVG height and width
- Dominant language
- TypeScript
- Stars
- 14.9k
- Forks
- 797
- PR merge metrics
- No merged PRs in 30d
Description
I'm using react-primitives-svg to render the same SVG code to both web and sketch:
```
switch (Platform.OS) {
case "sketch":
SvgLib = require("react-primitives-svg/lib/core.sketch");
break;
case "web":
SvgLib = require("react-primitives-svg/lib/core.web");
break;
default: // React Native should be able to pick up `core.ios.js` or `core.android.js` according to the platform
// SvgLib = require("react-primitives-svg");
}
```
Now the SVG height and width seem to be interpreted differently for Sketch and web.
`
Contributor guide
Research direction
Start by comparing the SVG sizing behavior in the core.sketch and core.web entry points using the two viewBox, width, and height examples from the report. Review the related discussion in issue #204 and reproduce both cases; done means the same SVG code renders at consistent dimensions on Sketch and web.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100