fix: make padding for md code blocks and code samples consistent

This commit is contained in:
Roman Hotsiy 2019-01-23 19:55:14 +07:00
parent 801fea0474
commit 007752dfc4
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 7 additions and 4 deletions

View File

@ -60,9 +60,13 @@ export const Tabs = styled(ReactTabs)`
background: ${({ theme }) => theme.codeSample.backgroundColor}; background: ${({ theme }) => theme.codeSample.backgroundColor};
& > div, & > div,
& > pre { & > pre {
padding: 20px; padding: ${props => props.theme.spacing.unit * 4}px;
margin: 0; margin: 0;
} }
& > div > pre {
padding: 0;
}
} }
`; `;
@ -93,8 +97,7 @@ export const SmallTabs = styled(Tabs)`
> .react-tabs__tab-panel { > .react-tabs__tab-panel {
& > div, & > div,
& > pre { & > pre {
padding: 10px 0; padding: ${props => props.theme.spacing.unit * 2} 0;
margin: 0;
} }
} }
`; `;

View File

@ -82,7 +82,7 @@ export const StyledMarkdownBlock = styled(PrismDiv as StyledComponent<
white-space:${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')}; white-space:${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')};
background-color: #263238; background-color: #263238;
color: white; color: white;
padding: 12px 14px 15px 14px; padding: ${props => props.theme.spacing.unit * 4}px;
overflow-x: auto; overflow-x: auto;
line-height: normal; line-height: normal;
border-radius: 0px border-radius: 0px