From 22d1336aa006f2ad036a091280d9b32c097d450f Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 7 Mar 2013 16:52:03 -0800 Subject: [PATCH] Apply correct flexbox styling to `.pane > .item-views > *` Markdown preview was overflowing because the min-height of flexbox items is automatically set to min-content. Setting it to 0 ensures that the item doesn't expand beyond its flex size. Moving this styling to atom.css ensures that people don't have to work too hard to fit their views into panes. --- .../markdown-preview/stylesheets/markdown-preview.css | 8 ++------ static/atom.css | 5 +++++ static/editor.css | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/packages/markdown-preview/stylesheets/markdown-preview.css b/src/packages/markdown-preview/stylesheets/markdown-preview.css index 9eb41bd60..e45e5f436 100644 --- a/src/packages/markdown-preview/stylesheets/markdown-preview.css +++ b/src/packages/markdown-preview/stylesheets/markdown-preview.css @@ -3,9 +3,8 @@ font-size: 14px; line-height: 1.6; background-color: #fff; - overflow: auto; + overflow: scroll; padding: 20px; - -webkit-flex: 1; } .markdown-preview pre, @@ -40,10 +39,7 @@ /* this code below was copied from https://github.com/assets/stylesheets/primer/components/markdown.css */ /* we really need to get primer in here somehow. */ -.markdown-preview { - font-size: 14px; - line-height: 1.6; - overflow: hidden; } +.markdown-preview {} .markdown-preview > *:first-child { margin-top: 0 !important; } .markdown-preview > *:last-child { diff --git a/static/atom.css b/static/atom.css index 6cfb79269..7013037a3 100644 --- a/static/atom.css +++ b/static/atom.css @@ -61,6 +61,11 @@ html, body { -webkit-flex-flow: column; } +#panes .pane .item-views > * { + -webkit-flex: 1; + min-height: 0; +} + @font-face { font-family: 'Octicons Regular'; src: url("octicons-regular-webfont.woff") format("woff"); diff --git a/static/editor.css b/static/editor.css index 1b6c35a74..c88b3f1f2 100644 --- a/static/editor.css +++ b/static/editor.css @@ -6,7 +6,6 @@ z-index: 0; font-family: Inconsolata, Monaco, Courier; line-height: 1.3; - -webkit-flex: 1; } .editor.mini {