benchmark image and caption specific styles

This commit is contained in:
Jerrod Estell 2024-11-11 15:56:14 -08:00
parent e92b011a9f
commit 6be470a994
2 changed files with 7 additions and 7 deletions

View file

@ -3,14 +3,14 @@
An extremely fast Python package and project manager, written in Rust.
<p align="center">
<img alt="Shows a bar chart with benchmark results." src="https://github.com/astral-sh/uv/assets/1309177/629e59c0-9c6e-4013-9ad4-adb2bcf5080d#only-light">
<img class="benchmark-image" alt="Shows a bar chart with benchmark results." src="https://github.com/astral-sh/uv/assets/1309177/629e59c0-9c6e-4013-9ad4-adb2bcf5080d#only-light">
</p>
<p align="center">
<img alt="Shows a bar chart with benchmark results." src="https://github.com/astral-sh/uv/assets/1309177/03aa9163-1c79-4a87-a31d-7a9311ed9310#only-dark">
<img class="benchmark-image" alt="Shows a bar chart with benchmark results." src="https://github.com/astral-sh/uv/assets/1309177/03aa9163-1c79-4a87-a31d-7a9311ed9310#only-dark">
</p>
<p align="center">
<p class="benchmark-caption">
<i>Installing <a href="https://trio.readthedocs.io/">Trio</a>'s dependencies with a warm cache.</i>
</p>

View file

@ -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 */