Comments (3)
This is an example of the only way i found to Color the SVG icon :
<div style="color:red;"> COLORED
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M22 12c2.76 0 5.26 1.12 7.07 2.93L24 20h12V8l-4.1 4.1C29.37 9.57 25.87 8 22 8 14.95 8 9.13 13.22 8.16 20h4.04c.93-4.56 4.96-8 9.8-8zm11.28 18.27c1.33-1.81 2.23-3.95 2.56-6.27H31.8c-.93 4.56-4.96 8-9.8 8-2.76 0-5.26-1.12-7.07-2.93L20 24H8v12l4.1-4.1c2.53 2.53 6.03 4.1 9.9 4.1 3.1 0 5.96-1.02 8.28-2.73L40 42.98 42.98 40l-9.7-9.73z"/></svg>
</div>
Copy all the SVG code every time you need an icon ! Is not an elegant solution but is the only i found for the moment ! I try to use the md-icon directive but do not work for the moment !
from material-design-icons.
Here is what I did:
for x in *px.svg;do sed "s/<path/<path fill=\"#ffffff\"/" ${x%*.*}.svg > ${x%*.*}-white.svg ;done
This takes all SVGs in the current directory adds the fill color to the path and saves
the changed file with the suffix -white.
Hope this helps
(Works only with bash...)
from material-design-icons.
You should have a look at the sprite previews, e.g., http://google.github.io/material-design-icons/sprites/svg-sprite/svg-sprite-action.html
They show how to inline the sprite, and then reference the icon you want with a ...
The problem is that only inline SVGs can be styled, so to change the color, they have to be inline.
There are various ways you can make this more elegant, but for now, what's shown in those sprite preview HTML pages is the best approach I can suggest.
from material-design-icons.
Related Issues (20)
- Icon request: color modes
- Icon Request: Coupon code or Promo code HOT 1
- Icon Request: Search for Events
- Error in sharp/edit_square symbol HOT 1
- Icon Request: AI Sparkle HOT 5
- Some icons not showing up.
- Icon Request: Antenna Dish
- Icon request: Network icons
- Icon Request: Variations of trophies and dates
- Web symbol for `star` doesn't have a non-fill version HOT 5
- Icon Request: Toilet
- We don't have Variable Fonts for Material yet HOT 1
- This project is incomplete
- The script to update this repo have been broken since February - All new icons since then are completely missing from the variable material symbols fonts ttf files. HOT 13
- change the thunderstorm icon and avoid confusion
- Ffv
- f91b4882103fbc1665e9e496846746003d29687a
- 863772068781954 863772068781947
- Új HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from material-design-icons.