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

Add missing comma to light-mode selector example #5632

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Add missing comma to light-mode selector example #5632

merged 1 commit into from
Jun 23, 2023

Conversation

charliermarsh
Copy link
Contributor

Summary

The dark-mode example (a few lines below) has a comma here, but the light-mode example does not. I think it's just missing, since IIUC this should be an "OR" query.

Thanks for the great project! (We use mkdocs-material to power the Ruff documentation.)

@squidfunk
Copy link
Owner

Thanks for the PR! Jup, there needs to be a comma. Good catch! Oh, and I'm psyched to see Ruff use Material for MkDocs!

@squidfunk squidfunk merged commit 9e0c005 into squidfunk:master Jun 23, 2023
@charliermarsh
Copy link
Contributor Author

Of course!

I will admit that I didn't look into it deeply, but I also had to add this (I believe only the latter was necessary -- dark-mode-only images still had display: none 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 */
}

[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 */
}

@charliermarsh charliermarsh deleted the charliermarsh-patch-1 branch June 23, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants