Dark/Light mode issue with tabbed documents

Hey people. Here is my problem:

  1. I work mostly in markdown, and I’ve been developing a CSS document to support this…in both light and dark modes.
  2. I also usually work with a document window holding multiple documents in tabs. (This is great for me, thanks for enabling it. )
  3. When I toggle dark/light mode, only the “front-most” (visible?) tab of these documents gets adjusted. All of the remaining tabs retain their color profile. So if I switch from light to dark, the current tab gets “darkened” but the remaining tabs do not. And I can’t figure a way to trigger a “re-render” to get them to respect the current light/dark setting.

Any help? Many thanks…

When you toggle from dark to light… where?

Using the system-level control in System Preferences.

  • Do you have Preferences > General > Appearance > Use dark background for documents enabled?

  • What kind of files are displayed in the tabs?

Thanks for investigating this, Jim.

I do have “Use dark background…” enabled. I also don’t seem to have much choice in the matter:

These are all markdown files.

I can reload the workspace to make everything align, but of course then I lose my session state.

You’re welcome.

  • So you’re developing an external stylesheet with an @media query for dark or light mode?

  • Where are you working on the stylesheet?

It’s eerie how you figured that. Yes indeed, I have been refining my markdown stylesheet. From no support for dark mode to now having some. That work is done save for final tweaks. (thanks for the pointers you’d posted for this, btw.)

The stylesheet is in an indexed folder, and I reference it in the Files → Markdown preference pane by x-devonthink-item:// link.

Oh, I’m working on the stylesheet in BBEdit. I use it for all my markdown (one of the reasons I used indexed folders.)

Does that help?

You’re welcome and :ghost: :open_mouth: :slight_smile:

Does the behavior persist if you quit and relaunch DEVONthink?

Restarting DEVONthink causes all the pages to re-render and preserves my session state, so it’s an acceptable workaround. Just something of a pain during times when I am switching dark/light mode off and on frequently, as I was when I was refining the CSS stylesheet.

But most of that is behind me now, and I’m not even sure it would be reasonable to ask that tabbed documents that don’t have focus could be re-rendered. Or even possible.

The workaround is fine, thanks again for your help Jim.

You’re very welcome (as always :blush: )

during times when I am switching dark/light mode off and on frequently,

Outside of you messing about with the styling, would this be a frequent thing you’d be doing
If so… why?