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 syntax highlighting in docs #1448

Merged
merged 6 commits into from
Apr 25, 2023
Merged

Conversation

keller-mark
Copy link
Member

@keller-mark keller-mark commented Mar 22, 2023

Fixes #1446

Change List

  • Fixes the background colors for the highlighted lines of code by setting the --docusaurus-highlighted-code-line-bg CSS variable (to fix the bug in referenced in the issue)
  • Copies syntax highlighting themes from prism-react-renderer into JS files in our documentation site directory to ensure they do not change. This now unifies the source of the theme used by both the Docusaurus code blocks and the "Translation to JSON" tab of http://localhost:3001/#?edit=true (when the JS language has been selected).
  • Adds custom themes for the Monaco Editor to reflect many of the colors in the prism themes. The caveat is that the JS tokenizer for prism is more fine-grained than the JS tokenizer for monaco so the token types do not have a one-to-one mapping.
  • Updates the version of the docusaurus packages

Checklist

  • Ensure PR works with all demos on the dev.vitessce.io homepage
  • Open (draft) PR's into vitessce-python and vitessce-r if this is a release PR
  • Documentation added or updated

Sorry, something went wrong.

@keller-mark keller-mark requested a review from ilan-gold March 23, 2023 14:57
@keller-mark keller-mark merged commit d84f753 into main Apr 25, 2023
@keller-mark keller-mark deleted the keller-mark/fix-docs-colors branch April 25, 2023 15:03
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.

Code highlighting colors in documentation are bad in light mode
2 participants