From b84ad79b2fe93b6b4ecd1bea1e6c8f2756daf8cd Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 20 Jan 2015 17:11:51 -0800 Subject: [PATCH 1/2] don't use fixed header instead, use static header and flex box to accomplish the same thing. fixes various issues related to scrolling, anchors, etc. --- IPython/html/static/base/less/page.less | 4 ++++ IPython/html/static/style/style.min.css | 17 +++++++++++++++++ IPython/html/templates/page.html | 4 +--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/IPython/html/static/base/less/page.less b/IPython/html/static/base/less/page.less index 27b9d5bd9..3472a9746 100644 --- a/IPython/html/static/base/less/page.less +++ b/IPython/html/static/base/less/page.less @@ -14,6 +14,7 @@ body { right: 0px; top: 0px; bottom: 0px; + .vbox(); overflow: visible; } @@ -81,6 +82,9 @@ body { width: 100%; display: none; .border-box-sizing(); + flex: 1; + overflow: auto; + 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..36583e969 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -8265,6 +8265,20 @@ body { right: 0px; top: 0px; bottom: 0px; + /* 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; overflow: visible; } #header { @@ -8329,6 +8343,9 @@ body { box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; + flex: 1; + overflow: auto; + 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 @@ -