New Google Play icon does not fit

Today I realized that the old link to the “Get it on Google Play” icon ( https://developer.android.com/images/brand/en_generic_rgb_wo_45.png ) no longer works (Android developers, update your sites!), And I checked the new version here: https://play.google.com/intl/en_us/badges/

I changed my code accordingly to

. . . src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge-border.png" height="45" /> 

However, now it no longer matches the App Store icon. The google icon is now around 37px, while the App Store icon is exactly the same as I set it, 45px tall.

It seems that the gasket around the white border is "hardcoded" in the picture. Check out my attached drawings for sizes.

Why did Google change everything again? Also, why can't it work like before? Do I really need to set it as a height of 55 pixels so that it looks like something like 45px? That sounds like awful code to me.

Edit: forgot picture enter image description here

+5
source share
1 answer

If you use the correct source image without the frame turned on, it is trivial to correctly set it correctly with the correct height:

 body { background:black; } img { border:1px solid white; border-radius:6px; box-sizing:border-box; height:45px; } span { background:#888; display:inline-block; height:45px; vertical-align:top; } 
 <img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png"> <span>Reference block of 45px high</span> 
+2
source

Source: https://habr.com/ru/post/1241199/


All Articles