feat(githubCorner): add width and height attributes
Summary
Add width and height attribute. This fixes jumping of the SVG for loading for slow connections.
Here is a video showing this behavior for the zod documentation:
https://user-images.githubusercontent.com/6173598/219676739-646d201a-313c-4f8f-8c2e-7983a7c71445.mp4
This adds width and height attributes to the github corner svg so that the intrinsic size is defined. See also https://web.dev/optimize-cls/#modern-best-practice. This does not prevent overwriting the size via CSS later so it shouldn't break any user CSS.
What kind of change does this PR introduce?
Bugfix
For any code change,
- [x] Related documentation has been updated if needed
- [ ] Related tests have been updated or tests have been added
Does this PR introduce a breaking change? (check one)
- [ ] Yes
- [x] No
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Tested in the following browsers:
- [x] Chrome
- [ ] Firefox
- [ ] Safari
- [ ] Edge
- [ ] IE
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docsify-preview | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 9, 2023 9:13pm |
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 43e310998b914a96f31e971929401b49f7112ce1:
| Sandbox | Source |
|---|---|
| docsify-template | Configuration |
Tests are not running for some reason.
Changing bases to main and back to develop fixed it (same issue I've had in other projects, changing base always works).
This will conflict with
- https://github.com/docsifyjs/docsify/pull/2106
We'll merge that one first.