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

Update padding for embed wrapper #12106

Draft
wants to merge 2 commits into
base: latest
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ exports[`SocialEmbedContainer AMP should match snapshot 1`] = `
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
min-height: 14rem;
}
Expand Down Expand Up @@ -551,7 +551,7 @@ exports[`SocialEmbedContainer Canonical should render a Facebook Post block and
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
min-height: 14rem;
}
Expand Down Expand Up @@ -887,7 +887,7 @@ exports[`SocialEmbedContainer Canonical should render a Facebook Video block and
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
}

Expand Down Expand Up @@ -1219,7 +1219,7 @@ exports[`SocialEmbedContainer Canonical should render a TikTok block and unmount
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
min-height: 14rem;
}
Expand Down Expand Up @@ -1668,7 +1668,7 @@ exports[`SocialEmbedContainer Canonical should render a Twitter block and unmoun
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
min-height: 14rem;
}
Expand Down Expand Up @@ -1979,7 +1979,7 @@ exports[`SocialEmbedContainer Canonical should render a YouTube block and unmoun
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
}

Expand Down Expand Up @@ -2427,7 +2427,7 @@ exports[`SocialEmbedContainer Canonical should render an Instagram block and unm
}

.emotion-2 {
margin-bottom: 1.5rem;
margin: 0.5rem 0;
max-width: 31.25rem;
min-height: 14rem;
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/legacy/containers/SocialEmbed/common/styles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled';
import { GEL_SPACING_TRPL } from '#psammead/gel-foundations/src/spacings';
import { GEL_SPACING } from '#psammead/gel-foundations/src/spacings';

/**
* MAX_WIDTH Ensures all embeds assume the same width. (Tweets max-out
Expand All @@ -25,7 +25,7 @@ const getWrapperHeightStyles = oEmbed => {
};

const Wrapper = styled.div`
margin-bottom: ${GEL_SPACING_TRPL};
margin: ${GEL_SPACING} 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This will affect embeds in Articles as well. Is that required/expected by UX?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah lol just realised that too ! Talking through it with UX now - can ignore this PR for now 🤦

Copy link
Contributor

Choose a reason for hiding this comment

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

No probs! Just wanted to check 😄

max-width: ${MAX_WIDTH};
${({ oEmbed }) => getWrapperHeightStyles(oEmbed)}

Expand Down
Loading