Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display of Custom Logo in Twenty Twenty #4422

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Mar 23, 2020

Summary

Fixes #4418

Before

image

After

image

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@westonruter westonruter added this to the v1.5 milestone Mar 23, 2020
@googlebot googlebot added the cla: yes Signed the Google CLA label Mar 23, 2020
@westonruter westonruter marked this pull request as ready for review March 23, 2020 23:22
Copy link
Member

@amedina amedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working neatly.

Copy link
Contributor

@kienstra kienstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Hi @westonruter,
This looks good. I tested the following Custom Logo dimensions, and they all looked the same in AMP and non-AMP.

120 x 90
1000 x 1000
1600 by 1200

custom-logo

$mobile_width = $mobile_height * ( $width / $height );

$html .= sprintf(
'<style data-src="%s">.site-logo amp-img { width: %frem; } @media (min-width: 700px) { .site-logo amp-img { width: %frem; } }</style>',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to use %f for float.

@westonruter westonruter merged commit 00a3396 into develop Mar 23, 2020
@westonruter westonruter deleted the fix/twentytwenty-custom-logo branch March 23, 2020 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Signed the Google CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Logo in Twenty Twenty lacks visual parity
5 participants