I added Sign in with Google button from https://developers.google.com/identity/gsi/web/guides/personalized-button
The default style fills whole width and looks OK:

But if you have an account, it shows it in the context:

This context adds width to the element style inside of the iframe. I know that by spec Google button should be within 40-400px range. I wanted to make the page container max-width: 400px, but this button simply doesn't scale together with container.
Do I have to use JavaScript, to update the data-width property or is there a normal solution with CSS?
<div class="g_id_signin" data-width="400" />