mugiwara85/CodeblockCustomizer

Codeblock settings background color does not take effect in reading mode

Closed this issue · 8 comments

Screenshot from 2023-05-23 23-13-23

Left hand side is editing mode, and the right hand side is reading mode.
The background is change to the setting color in editing mode but not in reading mode, other color settings like header settings and header language settings are working well.

PC os: ubuntu 16.04 and ubuntu 22.04, both have same issue.
Obsidian version: v1.2.8
Codeblock Customizer plugin version: 1.1.9

If you switch to another document and then back does the background color update?

If you switch to another document and then back does the background color update?

Other customized settings like header settings and header language settings updated after switch between different document, only the background color stay in the default color in reading mode. (Actually I discovered that all settings will take effect instantly in editing mode, reading mode will take effect when edit the codeblock content)

In editing mode every change should be displayed immediately. In reading mode you need to change the document to show the changes, because the document itself did not change. I did not find a solution until now to show the changes in reading mode immediately yet, but hopefully will soon.
Do you have some custom css applied? Or what theme do you use? If all other colors are displayed correctly, then the background color should also work. Or do you see any error in the console?

In editing mode every change should be displayed immediately. In reading mode you need to change the document to show the changes, because the document itself did not change. I did not find a solution until now to show the changes in reading mode immediately yet, but hopefully will soon. Do you have some custom css applied? Or what theme do you use? If all other colors are displayed correctly, then the background color should also work. Or do you see any error in the console?

I think i found the root cause. Currently I am using custom theme (Everforest) without any CSS Snippets, but when i switch back to default obsidian theme, the background setting start working correctly, I think is the obsidian custom theme replace the background setting.

Thx for helping, I think you can close this issue.

Which theme do you use? Everforest or Everforest Enchanted? I can have a look at it, and hopefully fix it, so it will work with this theme as well.

Everforest

Currently I comment pre-code color setting section from Everforest theme.css allow me to work around the problem.
It will be better if you can fix it.

Oooooooo, I'm sorry, I totally forgot about this. I will fix it tomorrow.

Sorry, it took this long, but it is fixed now in release 1.2.1. It should work now correctly.