From db503f8c23efd6bf27dc2b4db896666f0619891d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Cab=C3=A9?= Date: Thu, 5 Sep 2024 11:56:50 +0200 Subject: [PATCH] doc: css: stick footer at bottom MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make actual document take all vertical space available so that footer is always at the bottom, even when the page has very little content. Signed-off-by: Benjamin Cabé --- doc/_static/css/custom.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css index 2473675fa54..5b0bbae4b2d 100644 --- a/doc/_static/css/custom.css +++ b/doc/_static/css/custom.css @@ -171,6 +171,8 @@ a.icon-home:visited { .wy-nav-content { background-color: var(--content-background-color); + min-height: 100vh; + display: flex; } .wy-body-for-nav { @@ -757,6 +759,9 @@ kbd, .kbd, overflow-y: initial; max-height: initial; } + .wy-nav-content { + min-height: calc(100dvh - 64px); + } } /* Scrollbar styling */ @@ -888,6 +893,19 @@ dark-mode-toggle::part(toggleLabel){ font-size: 0.9rem; } +/* Make actual document take all vertical space available so that footer is always at the bottom */ + +.rst-content { + flex: 1; + display: flex; + flex-direction: column; + width: 100%; +} + +.document { + flex-grow: 1; +} + /* Custom search box, including search engine selection */ .search-container {