Attaches a plugin stylesheet to the main window and every popout window, including popouts opened later, and removes it on unload.
The stylesheet is a constructed CSSStyleSheet adopted through document.adoptedStyleSheets, so the plugin creates no <style> element (which the community review flags) and adds no CSS snippet to the user’s list. A constructed sheet can be adopted only by a document of the realm that constructed it, so each window gets its own sheet, built with that window’s CSSStyleSheet constructor. Constructable stylesheets need Electron 28 or iOS 16.4, both below the oldest runtime Obsidian supports.
| Class |
Description |
| StyleSheetComponent |
Attaches a stylesheet to the main window and every popout window while loaded. |
| Function |
Description |
| registerStyle |
Attaches a stylesheet to the main window and every popout window, including popouts opened later, until the owning component unloads. |