Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Move SVG out of HTML #664
We can get a significant decrease in page size by not sending SVG along with HTML.
The warning icons have been moved to an inline CSS element. This is used on the homepage and on the “repo show” page but with half opacity.
The Logos at the bottom of the page are moved to separate image links. This limits the ability to style the SVGs via CSS. Currently on hover they will turn Red. Instead the asset can be transformed to provide some visual indication of hover state.
The “code triage” logo at the top of every page was moved to a CSS inline element.
By moving these SVG elements out of the HTML it means they do not have to be sent over the wire on every page load. Instead they’re sent once and cached in the browser either in the application.css directly (for inline CSS elements) or via image links. We also benefit by being behind cloudflare for both of these assets.