-
-
Notifications
You must be signed in to change notification settings - Fork 23
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(docs): show wrong image in light theme #230
Conversation
WalkthroughThe changes involve modifications to the CSS rules governing the display of images in the documentation theme. A new rule is added to hide images that have a source ending in Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
docs/.vitepress/theme/custom.css (1)
23-25
: LGTM! Consider a minor adjustment for consistency.The new CSS rule effectively addresses the issue of incorrect image display in light theme mode, as mentioned in the PR objectives. It ensures that images intended for dark mode (with src ending in '#dark') are not displayed when the page is in light mode.
For consistency with the existing dark mode rule, consider adding the '.vp-doc' class selector:
-html:not(.dark) .vp-doc img[src$='#dark']{ +html:not(.dark) .vp-doc img[src$='#dark'] { display: none; }This change makes the selector more specific and aligns it with the existing dark mode rule, potentially preventing conflicts with other styles in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Hi reviewer,
I see the issue, both images are showing on light theme mode. I changed the CSS to show specific images in dark and light modes at: https://velite.js.org/guide/introduction
Previous Behaviour:
After:
Summary by CodeRabbit
New Features
Bug Fixes