Skip to content

🖍 [amp story shopping] Prevent shopping tag dot and image from shrinking#37149

Merged
processprocess merged 2 commits intoampproject:mainfrom
processprocess:shopping-icon
Dec 20, 2021
Merged

🖍 [amp story shopping] Prevent shopping tag dot and image from shrinking#37149
processprocess merged 2 commits intoampproject:mainfrom
processprocess:shopping-icon

Conversation

@processprocess
Copy link
Contributor

Prevents tag dot and image from shrinking when there is text. In the tag.

Screen Shot 2021-12-08 at 10 27 10 AM

Related to #37112
Text formatting will be added in #37039

@amp-owners-bot
Copy link

amp-owners-bot bot commented Dec 8, 2021

Hey @gmajoulet! These files were changed:

extensions/amp-story-shopping/0.1/amp-story-shopping-tag.css

justify-content: center !important;
background-color: rgba(0, 0, 0, 0.6) !important;
border-radius: 100% !important;
flex-shrink: 0 !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would setting flex-shrink to 0 cause other elements within the shopping tag (e.g., any text) to shrink in order to give space to the dot and image? I'm not familiar with flex-shrink, so I'm just basing my question on what I read here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is correct and intended since the text area can grow and shrink based on content.

@kristoferbaxter
Copy link
Contributor

Is there a set of visual diff tests that could decrease the likelihood of this regressing?

@processprocess
Copy link
Contributor Author

Is there a set of visual diff tests that could decrease the likelihood of this regressing?

Yes, it previously did not have a use-case to test this. It's now been updated.

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.

5 participants

Comments