MamoruDS / obsidian-open-link-with

Open external link with specific brower in Obsidian

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issue with dark theme or CSS

hannesdelbeke opened this issue · comments

Thank you for this amazing plugin. It really makes my life a lot easier.

One issue I recently encountered, the dark theme / custom Obsidian CSS is applied to the website opened in the tab.
Most of the time this doesn't seem to be the case, but some websites have this.
affected site is https://breadcrumbs-wiki.onrender.com/docs/Alternative%20Hierarchies/Hierarchy%20Notes

in this case it makes the text unreadable image it should look like this. image

did some investigating. it's caused by Obsidian's CSS, which is applied to the div of the iframe.

background color is set to same background color as obsidian.
if the website doesn't set a background color in their CSS, it will inherit the one from the iframe CSS

using ctrl-shit-i to inspect, i found the following.
image

image

adding the following css fixes it

iframe {
   background-color: white;
}

might want to change this so it only applies to iframes that are a child of tabs though so to not mess with users iframes

Hey there! I've added a white background to the iframe for now. Since a webpage with no background is not the common, I might make it a changeable setting in a future update.