Can a snippet detect which theme is in use?

Things I have tried

I’ve searched on both the forums and google, and I can’t find any discussions on this topic.

What I’m trying to do

I’m beginning to use snippets and I’m discovering that people will often include small adjustments for individual themes, which have unintended effects when using a theme other than the intended one.

What I’m looking for is some way to have parts of the snippet enabled only when a specific theme is enabled. I was hoping for something with Combinators, but I can’t seem to see anything that indicates theme.

Worst comes to worst I could try and implement a manual setting with the Style Settings plugin, but that seems clunky.

I think generally no? For that to work I think a theme would have to alter the markup to add a class or something, and I’d guess they generally don’t. If you don’t get any more helpful responses, you could try inspecting the markup of a few themes for anything that look theme-specific somewhere in the top.

In my vault I just put theme-specific styles in separate snippets.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.