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

Logo in header needs explicit width and height #234

Closed
keepthebyte opened this issue Apr 26, 2021 · 2 comments
Closed

Logo in header needs explicit width and height #234

keepthebyte opened this issue Apr 26, 2021 · 2 comments
Milestone

Comments

@keepthebyte
Copy link
Collaborator

keepthebyte commented Apr 26, 2021

Expected Behaviour

https://author-p7719-e13203.adobeaemcloud.com/content/experience-fragments/wknd/language-masters/en/site/header/master.html

The WKDN logo in the header is not setting a width and height in the markup - which is causing layout shift as the page is rendering.

Screenshot from Lighthouse:
Screen Shot 2021-04-26 at 2 31 10 PM

Actual Behaviour

No layout shift when rendering the page

@keepthebyte
Copy link
Collaborator Author

Solution might be to add the the size - for desktop and mobile breakpoint - into https://github.com/adobe/aem-guides-wknd/blob/master/ui.frontend/src/main/webpack/components/image/scss/styles/_logo.scss

@keepthebyte
Copy link
Collaborator Author

keepthebyte commented Apr 27, 2021

From: @vladbailescu - I quote:

Setting width and height on images goes against the adaptive image component.. - the best way forward is to start using <picture> tag, each <source> will then allow to provide width and height - See whatwg/html#4968 , it should soon be supported by all browsers

@davidjgonzalez davidjgonzalez added this to the 1.0.0 milestone May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants