Templarian / MaterialDesign-React

Dist for Material Design Icons React Component for JS/TypeScript
https://materialdesignicons.com
MIT License
143 stars 20 forks source link

Baseline flag #61

Closed arcanis closed 3 years ago

arcanis commented 3 years ago

Icons are currently always square and centered. In a lot of cases it's a good thing, but sometimes the design would be better served by being aligned with the neighbouring text. It would be nice to have a flag to instruct the generated svg element to exclude the surrounding transparent borders (at least on the bottom side).

Templarian commented 3 years ago

This would require storing those offset values somewhere for each icon. This is a bit outside of the scope of this component.

Can kind of remove the 2px by setting an transform: translate(-2px, -2px); margin 0 -4px -4px 0;.