From f5285e734cc2f10f513d9c5beec469311fb38456 Mon Sep 17 00:00:00 2001 From: Jerrod Estell Date: Mon, 11 Nov 2024 14:31:08 -0800 Subject: [PATCH 1/4] Progress fixing index reflow --- docs/stylesheets/extra.css | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 74c705543..cc35de223 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -85,6 +85,32 @@ display: inline; /* Show dark images in dark mode */ } +[data-md-color-scheme="astral-light"] img[src$="#only-light"], +[data-md-color-scheme="astral-light"] img[src$="#gh-light-mode-only"] { + display: inline; /* Show light images in light mode */ + height: 300px; /* Add size constraints here */ + width: 600px; +} + +[data-md-color-scheme="astral-dark"] img[src$="#only-light"], +[data-md-color-scheme="astral-dark"] img[src$="#gh-light-mode-only"] { + display: none; /* Hide light images in dark mode */ +} + +[data-md-color-scheme="astral-dark"] img[src$="#only-dark"], +[data-md-color-scheme="astral-dark"] img[src$="#gh-dark-mode-only"] { + display: inline; /* Show dark images in dark mode */ + height: 300px; /* Add size constraints here */ + width: 600px; +} + +/* Just keep minimal container styling */ +p[align="center"] { + display: flex; + align-items: center; + justify-content: center; +} + /* See: https://github.com/squidfunk/mkdocs-material/issues/175#issuecomment-616694465 */ .md-typeset__table { min-width: 100%; From 9cf46e66702f289913d398268fe890599d2988c6 Mon Sep 17 00:00:00 2001 From: Jerrod Estell Date: Mon, 11 Nov 2024 14:56:38 -0800 Subject: [PATCH 2/4] further progress. Issue with light mode --- docs/stylesheets/extra.css | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index cc35de223..ee692a1ba 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -88,8 +88,8 @@ [data-md-color-scheme="astral-light"] img[src$="#only-light"], [data-md-color-scheme="astral-light"] img[src$="#gh-light-mode-only"] { display: inline; /* Show light images in light mode */ - height: 300px; /* Add size constraints here */ - width: 600px; + height: 250px; /* Add size constraints here */ + width: 500px; } [data-md-color-scheme="astral-dark"] img[src$="#only-light"], @@ -100,15 +100,14 @@ [data-md-color-scheme="astral-dark"] img[src$="#only-dark"], [data-md-color-scheme="astral-dark"] img[src$="#gh-dark-mode-only"] { display: inline; /* Show dark images in dark mode */ - height: 300px; /* Add size constraints here */ - width: 600px; + height: 250px; + width: 500px; + margin-top: -3rem; } -/* Just keep minimal container styling */ -p[align="center"] { - display: flex; - align-items: center; - justify-content: center; +p[align="center"] i { + display: block; + margin-top: -3rem; } /* See: https://github.com/squidfunk/mkdocs-material/issues/175#issuecomment-616694465 */ From e92b011a9fdf0b81dc153cb775a0f9ff86638b8e Mon Sep 17 00:00:00 2001 From: Jerrod Estell Date: Mon, 11 Nov 2024 15:24:15 -0800 Subject: [PATCH 3/4] Finish PR - cleanup --- docs/stylesheets/extra.css | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index ee692a1ba..6a6c0adfe 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -86,21 +86,9 @@ } [data-md-color-scheme="astral-light"] img[src$="#only-light"], -[data-md-color-scheme="astral-light"] img[src$="#gh-light-mode-only"] { - display: inline; /* Show light images in light mode */ - height: 250px; /* Add size constraints here */ - width: 500px; -} - -[data-md-color-scheme="astral-dark"] img[src$="#only-light"], -[data-md-color-scheme="astral-dark"] img[src$="#gh-light-mode-only"] { - display: none; /* Hide light images in dark mode */ -} - -[data-md-color-scheme="astral-dark"] img[src$="#only-dark"], -[data-md-color-scheme="astral-dark"] img[src$="#gh-dark-mode-only"] { - display: inline; /* Show dark images in dark mode */ - height: 250px; +[data-md-color-scheme="astral-dark"] img[src$="#only-dark"] { + display: inline; + height: 250px; width: 500px; margin-top: -3rem; } From 6be470a994dab1768d142f46a63e4fc14b05113c Mon Sep 17 00:00:00 2001 From: Jerrod Estell Date: Mon, 11 Nov 2024 15:56:14 -0800 Subject: [PATCH 4/4] benchmark image and caption specific styles --- docs/index.md | 6 +++--- docs/stylesheets/extra.css | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.md b/docs/index.md index 7f4e34035..23477e278 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,14 +3,14 @@ An extremely fast Python package and project manager, written in Rust.

- Shows a bar chart with benchmark results. + Shows a bar chart with benchmark results.

- Shows a bar chart with benchmark results. + Shows a bar chart with benchmark results.

-

+

Installing Trio's dependencies with a warm cache.

diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 6a6c0adfe..a185de08c 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -85,17 +85,17 @@ display: inline; /* Show dark images in dark mode */ } -[data-md-color-scheme="astral-light"] img[src$="#only-light"], -[data-md-color-scheme="astral-dark"] img[src$="#only-dark"] { +[data-md-color-scheme="astral-light"] .benchmark-image[src$="#only-light"], +[data-md-color-scheme="astral-dark"] .benchmark-image[src$="#only-dark"] { display: inline; height: 250px; width: 500px; margin-top: -3rem; } -p[align="center"] i { - display: block; +.benchmark-caption { margin-top: -3rem; + text-align: center; } /* See: https://github.com/squidfunk/mkdocs-material/issues/175#issuecomment-616694465 */