GoogleIcons | Pls don't DMCA me -
kandi X-RAY | GoogleIcons Summary
kandi X-RAY | GoogleIcons Summary
Pls don't DMCA me
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GoogleIcons
GoogleIcons Key Features
GoogleIcons Examples and Code Snippets
Community Discussions
Trending Discussions on GoogleIcons
QUESTION
I have SVG of google symbol which is in 4 different colors. I want to use this SVG within my code with this colors using mat-icon. However when I tried to attach this SVG in my code it is turning black and white.
Here is my code for SVG attachment
...ANSWER
Answered 2019-Nov-04 at 11:40Mat icon by default, sets the color of the svgs you register, following the formula mentioned in the docs
the default color of the SVG content is the CSS currentColor value. This makes SVG icons by default have the same color as surrounding text, and allows you to change the color by setting the "color" style on the mat-icon element.
This is the default functionality and there is no way to change this. The color attribute onle gets three values from the theme css
- Primary
- Warn
- Accent
So, you need to either override it globally (thus destroying the theming of all the material icons) or per case.
The only options you have while registering is the viewport, so you'd have to go via the css way. The css that sets up the currentColor is the following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GoogleIcons
You can use GoogleIcons like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the GoogleIcons component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page