google / google/material-design-lite

Is it possible to use SVG sprites for MDL components?

Open
#4,130 2 comments 0 reactions 0 assignees View on GitHub
Layout
Dominant language
HTML
Stars
32.2k
Forks
4.9k
PR merge metrics
No merged PRs in 30d

Description

In order to make the component icons rendered we need to add Material Icons font to the page. We already use SVG versions of the icons and want to reuse them for the components instead of duplicating them with the fonts file.

If I add SVG sprites to the page the components do not pick up the icons and empty squares rendered instead of icons. Example:

``` html







```

Result:
![image](https://cloud.githubusercontent.com/assets/182853/13081005/277ffd0e-d4dc-11e5-89ae-78fe197ac0ff.png)
Expected - the menu icon is rendered:
![image](https://cloud.githubusercontent.com/assets/182853/13081091/82d45786-d4dc-11e5-8e1c-cd5ebb045e44.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.