Web panels custom CSS
-
Is it possible to insert CSS to webpanel's webview? There is electron API for that, but it seems to be switched off or something
I know I can just use userstyles, but my goal is not that simple. I want to proxy theming properties from the browser to the web panel to be able to make it look like native panel. -
The API you're trying to use (which is from Chrome, not Electron, btw) is not switched off, you're just using it wrong (hence the
No matching signature
message).insertCSS
takes an InjectDetails object as its parameter, not a string. This is a JavaScript object with either acode
orfile
element://InjectDetails with a code element temp.insertCSS({code: "body{display:none}"}) //InjectDetails with a file element temp.insertCSS({file: "style/my_style.css"})
-
@Komposten
Thank you! -
-