klarsys/angular-material-icons

viewBox sizes?

Closed this issue · 1 comments

Shouldn't viewBox be the same size as the icon declaration size.

If I use size="20" the render is:

<ng-md-icon icon="person" size="20">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="....."></path></svg>
</ng-md-icon>

I suppose it would be better:

<ng-md-icon icon="person" size="20">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20" height="20"><path d="....."></path></svg>
</ng-md-icon>

Thanks

Shape definitions of icons assume viewBox size of 24x24. I'm afraid setting viewBox to smaller size will crop icons and setting it to higher size will not scale them up.

Keeping viewBox to 24x24 and changing width & height seems to scale icons proportionately.

Let me know if you see a different behavior.