question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect theme for code blocks in light mode

See original GitHub issue

I followed the steps:

npx @docusaurus/init@latest init docs classic
cd docs
npm docusaurus start

Then I realized that the code blocks had a dark theme, unlike the rest of the project. If I switch to dark mode everything will change, except for the code blocks that remain the same.

  1. My project in light mode: https://i.imgur.com/ayshMzw.png
  2. My project in dark mode: https://i.imgur.com/Dz474na.png

I would like the theme to be the same as that shown on the official website in which the code blocks respect the light theme.

  1. Docusaurus website in light mode: https://i.imgur.com/YVUn2G5.png
  2. Docusaurus website in dark mode: https://i.imgur.com/aTvQXkn.png

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
slorbercommented, May 18, 2021

I believe this is documented: https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting

You have to use custom CSS and define your own highlighting color.

image

0reactions
slorbercommented, Jun 14, 2021

We could do both, do you want to open a PR?

That seems reasonable to improve the discoverability of the code block theming

Read more comments on GitHub >

github_iconTop Results From Across the Web

General dark theme (not only for editor) - Code::Blocks Forums
Is it possible to set a theme for the whole environment e.g. menu ... You can set the dark mode for all the...
Read more >
How to Change the Theme of Code Blocks 20.03 to Dark ...
Step 4: Open cortana (of Windows 10) and type 'magnifier' as shown below: Step 5: Hit enter and you see the codeblocks white...
Read more >
CodeBlocks dark theme (not just the editor's theme)
I want to change every whitespace to dark. How can I do so? c++ · c · ide · codeblocks.
Read more >
How to change the editor theme in the Code::Blocks IDE?
I have installed Code::Blocks in my windows pc for C/C++ development. But the editor theme is not the darker one as I generally...
Read more >
How To Install Dark Themes In Code::Blocks - Sangam's Blog
Code ::Blocks comes with light theme by default and not all users like it. There is no option to change the editor theme...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found