Skip to content

Commit 55cf565

Browse files
tdawgymmalerba
authored andcommitted
Updated readme to include theming (#1906)
* docs(md-icon theming): updated readme to include theming * docs(md-icon theming): updated readme to include theming
1 parent dd508ea commit 55cf565

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/lib/icon/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,19 @@ Multiple icon sets can be registered in the same namespace. If you request an ic
8585

8686
Note that all SVG icons are fetched via XmlHttpRequest, and due to the same-origin policy their URLs must be on the same domain as the containing page, or their servers must be configured to allow cross-domain access.
8787

88+
### Theming
89+
90+
Icons can be themed to match your "primary" palette, your "accent" palette, or your "warn" palette using the `color` attribute.
91+
Simply pass in the palette name.
92+
93+
Example:
94+
95+
```html
96+
<md-icon color="primary">home</md-icon>
97+
<md-icon color="accent">home</md-icon>
98+
<md-icon color="warn">home</md-icon>
99+
```
100+
88101
### Accessibility
89102

90103
If you set an "aria-label" attribute on the md-icon element, its value will be used as-is. If you do not, the md-icon component will attempt to set the aria-label value from one of these sources:

0 commit comments

Comments
 (0)