@@ -39,16 +39,16 @@ explicitly set by calling `MatIconRegistry.setDefaultFontSetClass`.
3939When an ` mat-icon ` component displays an SVG icon, it does so by directly inlining the SVG content
4040into the page as a child of the component. (Rather than using an <img > tag or a div background
4141image). This makes it easier to apply CSS styles to SVG icons. For example, the default color of the
42- SVG content is the CSS
43- [ currentColor] ( https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentColor_keyword )
44- value. This makes SVG icons by default have the same color as surrounding text, and allows you to
42+ SVG content is the CSS
43+ [ currentColor] ( https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentColor_keyword )
44+ value. This makes SVG icons by default have the same color as surrounding text, and allows you to
4545change the color by setting the "color" style on the ` mat-icon ` element.
4646
47- In order to prevent XSS vulnerabilities, any SVG URLs passed to the ` MatIconRegistry ` must be
47+ In order to prevent XSS vulnerabilities, any SVG URLs passed to the ` MatIconRegistry ` must be
4848marked as trusted resource URLs by using Angular's ` DomSanitizer ` service.
4949
50- Also note that all SVG icons are fetched via XmlHttpRequest, and due to the same-origin policy,
51- their URLs must be on the same domain as the containing page, or their servers must be configured
50+ Also note that all SVG icons are fetched via XmlHttpRequest, and due to the same-origin policy,
51+ their URLs must be on the same domain as the containing page, or their servers must be configured
5252to allow cross-domain access.
5353
5454#### Named icons
@@ -74,8 +74,8 @@ more than one icon set, the icon from the most recently registered set will be u
7474
7575### Theming
7676
77- By default, icons will use the current font color (` currentColor ` ). this color can be changed to
78- match the current theme's colors using the ` color ` attribute. This can be changed to
77+ By default, icons will use the current font color (` currentColor ` ). this color can be changed to
78+ match the current theme's colors using the ` color ` attribute. This can be changed to
7979` 'primary' ` , ` 'accent' ` , or ` 'warn' ` .
8080
8181### Accessibility
@@ -91,6 +91,16 @@ In thinking about accessibility, it is useful to place icon use into one of thre
91912 . ** Interactive** : a user will click or otherwise interact with the icon to perform some action.
92923 . ** Indicator** : the icon is not interactive, but it conveys some information, such as a status.
9393
94+ ### Bidirectionality
95+
96+ By default icons in an RTL layout will look exactly the same as in LTR, however certain icons have
97+ to be [ mirrored for RTL users] ( https://material.io/guidelines/usability/bidirectionality.html ) . If
98+ you want to mirror an icon only in an RTL layout, you can use the ` mat-icon-rtl-mirror ` CSS class.
99+
100+ ``` html
101+ <mat-icon class =" mat-icon-rtl-mirror" svgIcon =" thumb-up" ></mat-icon >
102+ ```
103+
94104#### Decorative icons
95105When the icon is puely cosmetic and conveys no real semantic meaning, the ` <mat-icon> ` element
96106should be marked with ` aria-hidden="true" ` .
0 commit comments