Consider the following simple React / MaterialUI component
<div>
<MenuIcon />
<span style={{ font: '-apple-system-body' }}>Hello World</span>
</div>
Result of this on my iPhone is attached. As I change the Settings > Accessibility > Larger Text
option on my iPhone, the Hello World
text resizes itself. The icon, however, doesnt. Is there a way to make the icon resize too?
I noticed that
<MenuIcon>
setsfont-size:1.5rem
by default. Hence,<MenuIcon style={{ fontSize: 'inherit' }}/>
undid this, and addingtransform: scale(1.5)
made up for the smaller svg size. Further, I had to set the container of the icon to the-apple-system-body
for the container to respond to changed text-size in the accessibility settings.