Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Use SVGs and clip-path instead of images for icons. #89

Merged
merged 2 commits into from
Dec 1, 2015
Merged

Use SVGs and clip-path instead of images for icons. #89

merged 2 commits into from
Dec 1, 2015

Conversation

chuckharmston
Copy link
Contributor

So, this is pretty cool. Instead of external base64 image assets (SVG or PNG), we instead include a single SVG element in the index template (they have to be in markup, unfortunately, for build process reasons) and use the CSS clip-path property to hide a solid block of background color. This will save bytes + memory, and also let us change the color of the icons by simply manipulating (+ transitioning!) that background color.

This addresses issue #75.

r? @6a68

screen shot 2015-11-26 at 6 48 41 pm

@jaredhirsch
Copy link
Member

Whoops, didn't realize these PRs were piling up! Merging...

jaredhirsch added a commit that referenced this pull request Dec 1, 2015
Use SVGs and `clip-path` instead of images for icons.
@jaredhirsch jaredhirsch merged commit 76c91cb into mozilla:master Dec 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants