Skip to content

Commit 007752d

Browse files
committed
fix: make padding for md code blocks and code samples consistent
1 parent 801fea0 commit 007752d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/common-elements/tabs.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,13 @@ export const Tabs = styled(ReactTabs)`
6060
background: ${({ theme }) => theme.codeSample.backgroundColor};
6161
& > div,
6262
& > pre {
63-
padding: 20px;
63+
padding: ${props => props.theme.spacing.unit * 4}px;
6464
margin: 0;
6565
}
66+
67+
& > div > pre {
68+
padding: 0;
69+
}
6670
}
6771
`;
6872

@@ -93,8 +97,7 @@ export const SmallTabs = styled(Tabs)`
9397
> .react-tabs__tab-panel {
9498
& > div,
9599
& > pre {
96-
padding: 10px 0;
97-
margin: 0;
100+
padding: ${props => props.theme.spacing.unit * 2} 0;
98101
}
99102
}
100103
`;

src/components/Markdown/styled.elements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const StyledMarkdownBlock = styled(PrismDiv as StyledComponent<
8282
white-space:${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')};
8383
background-color: #263238;
8484
color: white;
85-
padding: 12px 14px 15px 14px;
85+
padding: ${props => props.theme.spacing.unit * 4}px;
8686
overflow-x: auto;
8787
line-height: normal;
8888
border-radius: 0px

0 commit comments

Comments
 (0)