Commit 2e0b8ce4bb16a02e4cd318521b2a2901d1cadb23

Jannik Zschiesche 2014-07-22T18:49:19

Coy theme: Fix issue with defined height of the <pre> tag * The max-height on the `<pre>` is if there is no defined height. The definitions of the code ensure, that the contents stay inside the `<pre>`. The `width: 100%` is need if there is no defined height of the `<pre>`, see http://stackoverflow.com/questions/14262938/child-with-max-height-100-overflows-parent.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/themes/prism-coy.css b/themes/prism-coy.css
index faa7467..4caa6c6 100644
--- a/themes/prism-coy.css
+++ b/themes/prism-coy.css
@@ -41,10 +41,12 @@ pre[class*="language-"] {
   background-size: 3em 3em;
   background-origin:content-box;
   overflow: visible;
+  max-height: 30em;
 }
 
 code[class*="language"] {
-  max-height: 30em;
+  max-height: inherit;
+  height: 100%;
   padding: 0 1em;
   display:block;
   overflow: auto;