From 4af737636dbd59655b7b93b7bc5b66987e255292 Mon Sep 17 00:00:00 2001 From: Alexander Kachkaev Date: Fri, 11 Jan 2019 21:55:25 +0000 Subject: [PATCH] fix(docz-theme-default): fix padding in Playground elements Resolves https://github.com/pedronauck/docz/issues/398#issuecomment-453663552 --- core/docz-theme-default/src/components/ui/CodeMirror/index.tsx | 1 + core/docz-theme-default/src/components/ui/Render/Handle.tsx | 1 + core/docz-theme-default/src/components/ui/Render/index.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/core/docz-theme-default/src/components/ui/CodeMirror/index.tsx b/core/docz-theme-default/src/components/ui/CodeMirror/index.tsx index 143c9913b..f2dfe960e 100644 --- a/core/docz-theme-default/src/components/ui/CodeMirror/index.tsx +++ b/core/docz-theme-default/src/components/ui/CodeMirror/index.tsx @@ -52,6 +52,7 @@ const EditorStyled = styled(BaseCodeMirror)` .CodeMirror-lines { padding: 10px 0; + box-sizing: content-box; } .CodeMirror-line { diff --git a/core/docz-theme-default/src/components/ui/Render/Handle.tsx b/core/docz-theme-default/src/components/ui/Render/Handle.tsx index 254840d79..e53eed1a3 100644 --- a/core/docz-theme-default/src/components/ui/Render/Handle.tsx +++ b/core/docz-theme-default/src/components/ui/Render/Handle.tsx @@ -46,6 +46,7 @@ export const Handle = styled('div')` border: 1px solid ${p => lighten(0.03, borderColor(p))}; border-radius: ${whenHorizontal('0 4px 4px 0', '0 0 4px 4px')}; background: ${p => darken(0.01, preBg(p))}; + box-sizing: content-box; ${whenHorizontal( ` diff --git a/core/docz-theme-default/src/components/ui/Render/index.tsx b/core/docz-theme-default/src/components/ui/Render/index.tsx index a32297792..6785e18a2 100644 --- a/core/docz-theme-default/src/components/ui/Render/index.tsx +++ b/core/docz-theme-default/src/components/ui/Render/index.tsx @@ -83,6 +83,7 @@ const StyledError = styled(LiveError)` ` const Pre = styled(PreBase as any)` + box-sizing: content-box; width: calc(100% - 2px); border-radius: 0 !important; margin: 0;