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

tweak dark mode #418

Merged
merged 1 commit into from
Jan 13, 2025
Merged

tweak dark mode #418

merged 1 commit into from
Jan 13, 2025

Conversation

bzy-debug
Copy link
Collaborator

No description provided.

Copy link

‼️ This code review is generated by a bot. Please verify the content before trusting it.

Here are three observations and potential issues from the provided git diff output:

  1. Theme Handling in shiki.ts:

    • The renderMoonBitCode function now supports both light and dark themes, but the themes object is passed directly to codeToHtml. Ensure that the shiki library supports this configuration. If not, this could lead to runtime errors or unexpected behavior when rendering code blocks.
  2. Theme Toggle Logic in index.html:

    • The theme toggle logic assumes the presence of an element with the ID #theme. If this element does not exist in the HTML, the script will throw an error when trying to set themeButton.innerHTML. Ensure that the element with ID theme exists in the HTML structure.
  3. CSS Specificity in style.css:

    • The new CSS rules for .shiki and .shiki span in the dark theme use !important extensively. This can lead to specificity issues and make it harder to override these styles in the future. Consider reducing the use of !important and relying on proper CSS specificity instead.

These are the key points to review and address to ensure the changes work as intended.

@bzy-debug bzy-debug merged commit 64b23b7 into main Jan 13, 2025
4 checks passed
@bzy-debug bzy-debug deleted the zhiyuan/tweak-dark-mode branch January 13, 2025 07:23
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.

1 participant