Skip to content

Add missing comma to light-mode selector example#5632

Merged
squidfunk merged 1 commit intosquidfunk:masterfrom
charliermarsh:charliermarsh-patch-1
Jun 23, 2023
Merged

Add missing comma to light-mode selector example#5632
squidfunk merged 1 commit intosquidfunk:masterfrom
charliermarsh:charliermarsh-patch-1

Conversation

@charliermarsh
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants