diff --git a/IPython/html/static/base/less/page.less b/IPython/html/static/base/less/page.less index 27b9d5bd9..c58166187 100644 --- a/IPython/html/static/base/less/page.less +++ b/IPython/html/static/base/less/page.less @@ -14,6 +14,9 @@ body { right: 0px; top: 0px; bottom: 0px; + @media not print { + .vbox(); + } overflow: visible; } @@ -81,6 +84,11 @@ body { width: 100%; display: none; .border-box-sizing(); + overflow: auto; + @media not print { + flex: 1; + height: 0px; // triggers overflow, but overridded by flex + } } /* Smaller buttons */ diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 6507f5cf2..ea47e5595 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -8267,6 +8267,24 @@ body { bottom: 0px; overflow: visible; } +@media not print { + body { + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; + } +} #header { /* Initially hidden to prevent FLOUC */ display: none; @@ -8329,6 +8347,13 @@ body { box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; + overflow: auto; +} +@media not print { + #site { + flex: 1; + height: 0px; + } } /* Smaller buttons */ .ui-button .ui-button-text { diff --git a/IPython/html/templates/page.html b/IPython/html/templates/page.html index eb362c1a6..09131fe5e 100644 --- a/IPython/html/templates/page.html +++ b/IPython/html/templates/page.html @@ -81,7 +81,7 @@ -