Skip to content

Commit

Permalink
support vertical rule in beta containers
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 committed Nov 29, 2024
1 parent c305fb9 commit 2c92847
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
22 changes: 21 additions & 1 deletion dotcom-rendering/src/components/FrontSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,22 @@ const sectionContentPadded = css`
}
`;

const sectionContentBorderFromLeftCol = css`
position: relative;
${from.leftCol} {
:before {
content: '';
position: absolute;
top: ${space[2]}px;
bottom: ${space[6]}px;
border-left: 1px solid ${schemePalette('--section-border')};
/** Hack to align exactly with the left border of the first scrollable card
* TODO - fix this properly */
left: -0.5px;
}
}
`;

const sectionBottomContent = css`
grid-row: bottom-content;
grid-column: content;
Expand Down Expand Up @@ -519,7 +535,7 @@ export const FrontSection = ({
!!pageId &&
!!ajaxUrl &&
!containerLevel;
const showVerticalRule = !hasPageSkin && !containerLevel;
const showVerticalRule = !hasPageSkin;

/**
* id is being used to set the containerId in @see {ShowMore.importable.tsx}
Expand Down Expand Up @@ -579,6 +595,7 @@ export const FrontSection = ({
title?.toLowerCase() === 'opinion',
),
showVerticalRule &&
!containerLevel &&
sectionHeadlineFromLeftCol(
schemePalette('--section-border'),
),
Expand Down Expand Up @@ -622,6 +639,9 @@ export const FrontSection = ({
sectionContentPadded,
sectionContentRow(toggleable),
topPadding,
showVerticalRule &&
!!containerLevel &&
sectionContentBorderFromLeftCol,
]}
id={`container-${sectionId}`}
>
Expand Down
13 changes: 0 additions & 13 deletions dotcom-rendering/src/components/ScrollableCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@ const containerStyles = css`
margin-left: ${gridGap / 2}px;
margin-right: ${gridGap / 2}px;
}
${from.leftCol} {
margin-left: 0;
::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 1px;
background-color: ${palette('--card-border-top')};
transform: translateX(-50%);
}
}
`;

const containerWithNavigationStyles = css`
Expand Down

0 comments on commit 2c92847

Please sign in to comment.