From: Mike Bayer Date: Tue, 27 May 2014 21:55:38 +0000 (-0400) Subject: - again use "fixed" for sidebar in all automated cases, dynamically X-Git-Tag: rel_1_0_0b1~415^2^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70159e7551b2479ade34a9382bfe76af485e1212;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - again use "fixed" for sidebar in all automated cases, dynamically adjust its top within the initial scroll period, this is what foundationdb is doing. For whatever reason that comes out smooth on all browsers. the rationale is so that its independently scrollable at all times. --- diff --git a/doc/build/static/docs.css b/doc/build/static/docs.css index dacabde90a..3bb77acc41 100644 --- a/doc/build/static/docs.css +++ b/doc/build/static/docs.css @@ -192,7 +192,6 @@ a.headerlink:hover { z-index: 3; background-color: #EFEFEF; - /*position: absolute;*/ float: left; top: 120px; bottom: 0; @@ -228,6 +227,10 @@ a.headerlink:hover { } +#docs-sidebar.preautomated { + position: fixed; +} + #docs-sidebar.automated { position: fixed; float: none; @@ -381,8 +384,8 @@ th.field-name { } div.section { - /*clear:right;*/ } + div.note, div.warning, p.deprecated, div.topic, div.admonition { background-color:#EEFFEF; } diff --git a/doc/build/static/init.js b/doc/build/static/init.js index 0732890c91..356b1f7261 100644 --- a/doc/build/static/init.js +++ b/doc/build/static/init.js @@ -14,6 +14,11 @@ function initFloatyThings() { automatedBreakpoint = $("#docs-container").position().top; parentOffset = $("#docs-container").parent().position().top - $("#docs-container").position().top; + + // safari doesn't give us 120px for this CSS even though + // it's in docs.css as that + sidebarTop = "120px"; //$("#docs-sidebar").css("top"); + $("#docs-top-navigation-container").addClass("preautomated"); $("#docs-sidebar").addClass("preautomated"); $("#docs-container").addClass("preautomated"); @@ -35,12 +40,13 @@ function initFloatyThings() { // a little squashed containerHeight = $("#docs-top-navigation-container").height(); $("#docs-body").css("margin-top", containerHeight - parentOffset + 1); + $("#docs-sidebar").css("top", sidebarTop); } else { - $("#docs-sidebar.automated").scrollTop(0); $("#docs-sidebar").removeClass("automated"); $("#docs-top-navigation-container").removeClass("automated"); $("#docs-body").css("margin-top", ""); + $("#docs-sidebar").css("top", $("#docs-body").offset().top - scrolltop); }