Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reflow of index on image load: benchmark image - #6264 #9033

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@
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"] {
display: inline;
height: 250px;
width: 500px;
Comment on lines +91 to +92
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these characteristics be set just for this specific image? Is there a reason you decided to implement it in the general css?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good suggestion. Initially I wanted to leave the index file unmodified, but I like your suggestion. Here it is.

margin-top: -3rem;
}

p[align="center"] i {
display: block;
margin-top: -3rem;
}

/* See: https://github.com/squidfunk/mkdocs-material/issues/175#issuecomment-616694465 */
.md-typeset__table {
min-width: 100%;
Expand Down
Loading