Skip to content

Commit

Permalink
Add spacing to thrasher and reduce ad spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
abeddow91 committed Dec 5, 2024
1 parent 4cb83ae commit 8f79575
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
27 changes: 13 additions & 14 deletions dotcom-rendering/src/components/AdSlot.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const mobileStickyAdStylesFullWidth = css`
}
`;

const extraContainerSpacingStyles = css`
const extraContainerBottomSpacingStyles = css`
margin-bottom: 16px;
`;

Expand Down Expand Up @@ -563,14 +563,7 @@ export const AdSlot = ({
return (
<div
className="ad-slot-container"
css={[
merchandisingAdContainerStyles,
containerSpacing === 'large' &&
extraContainerSpacingStyles,
css`
outline: green solid 1px;
`,
]}
css={[merchandisingAdContainerStyles]}
>
<div
id="dfp-ad--merchandising-high"
Expand All @@ -579,7 +572,14 @@ export const AdSlot = ({
'ad-slot',
'ad-slot--merchandising-high',
].join(' ')}
css={[merchandisingAdStyles]}
css={[
merchandisingAdStyles,
containerSpacing &&
extraContainerBottomSpacingStyles,
css`
outline: green solid 1px;
`,
]}
data-link-name="ad slot merchandising-high"
data-name="merchandising-high"
data-refresh="false"
Expand Down Expand Up @@ -616,8 +616,7 @@ export const AdSlot = ({
className="top-fronts-banner-ad-container"
css={[
frontsBannerAdTopContainerStyles,
containerSpacing === 'large' &&
extraContainerSpacingStyles,
containerSpacing && extraContainerBottomSpacingStyles,
css`
outline: hotpink solid 1px;
`,
Expand Down Expand Up @@ -756,8 +755,8 @@ export const AdSlot = ({
].join(' ')}
css={[
mobileFrontAdStyles,
containerSpacing === 'large' &&
extraContainerSpacingStyles,
containerSpacing &&
extraContainerBottomSpacingStyles,
css`
outline: red solid 1px;
`,
Expand Down
2 changes: 1 addition & 1 deletion dotcom-rendering/src/components/ElementContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const sidePadding = css`
`;

const bottomPadding = css`
padding-bottom: ${space[9]}px;
padding-bottom: ${space[4]}px;
`;

const sideBorderStyles = css`
Expand Down
3 changes: 1 addition & 2 deletions dotcom-rendering/src/components/FrontSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ export const FrontSection = ({
!!ajaxUrl &&
!containerLevel;
const showVerticalRule = !hasPageSkin;
console.log({ containerName, containerSpacing });
/**
* id is being used to set the containerId in @see {ShowMore.importable.tsx}
* this id pre-existed showMore so is probably also being used for something else.
Expand All @@ -517,7 +516,6 @@ export const FrontSection = ({
containerStylesUntilLeftCol,
!hasPageSkin && containerStylesFromLeftCol,
hasPageSkin && pageSkinContainer,
containerSpacing === 'large' && extraBottomPadding,
]}
style={{
backgroundColor: schemePalette(
Expand Down Expand Up @@ -608,6 +606,7 @@ export const FrontSection = ({
sectionContentPadded,
sectionBottomContent,
!containerLevel && bottomPadding,
containerSpacing === 'large' && extraBottomPadding,
]}
>
{isString(targetedTerritory) &&
Expand Down
4 changes: 4 additions & 0 deletions dotcom-rendering/src/layouts/FrontLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ export const FrontLayout = ({ front, NAV }: Props) => {
<Section
fullWidth={true}
padSides={false}
padBottom={
collection.containerSpacing ===
'large'
}
showTopBorder={false}
showSideBorders={false}
ophanComponentLink={
Expand Down

0 comments on commit 8f79575

Please sign in to comment.