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

feat(site-header): Using picture, keeping data structure unchanged - FRONT-3882 #2810

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

planctus
Copy link
Contributor

@planctus planctus commented Mar 23, 2023

Use picture tag to handle logo

Note: for EU, the change of logo between mobile and desktop is now handled with the picture source

@github-actions
Copy link

github-actions bot commented Mar 23, 2023

Copy link
Contributor

@emeryro emeryro left a comment

Choose a reason for hiding this comment

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

Coulnd't we take advantage of the picture sources to group the mobile and desktop logo in the same tag?

@planctus
Copy link
Contributor Author

Fascinating, i did this on my own and then i read your comment.. :)

media="(min-width: 996px)"
srcset="/standard-version/positive/logo-eu--en.svg"
/>
<source
Copy link
Contributor

Choose a reason for hiding this comment

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

this second source is not needed. By default it will take the image in the img tag (mobile) and switch to desktop

@@ -78,16 +78,12 @@ $_search-width-xl: 31.5rem;
flex-grow: 1;
}

.ecl-site-header__logo-image-mobile {
Copy link
Contributor

Choose a reason for hiding this comment

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

if we remove the previous css class definition, that would be a breaking change
So we should either keep them (deprecated) or flag the pr as breaking

@emeryro emeryro merged commit 803046e into v3.8.0-dev Mar 28, 2023
@emeryro emeryro deleted the FRONT-3882-Picture-in-site-header branch March 28, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants