silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.04k stars 141 forks source link

Introduce Space Style, similar to Space Script #790

Closed zefhemel closed 3 months ago

zefhemel commented 4 months ago

Inspired by https://github.com/silverbulletmd/silverbullet/pull/786:

Perhaps we should have space-style in addition to space-script but containing CSS that is included on the page, similar to https://silverbullet.md/STYLES

For instance, as follows:

```space-style
#sb-root {
   --editor-font: "Courier" !important;
}

```

Rationale: It would be nice to be able to add custom SilverBullet CSS across multiple pages, not just one as supported right now with the customStyles setting. This would allow for https://silverbullet.md/Libraries that contain:

For the future: it would then also be nice to more easily attach custom styles to page elements. I'm open to ideas for how this could work, the most obvious candidate would be this: https://github.com/silverbulletmd/silverbullet/issues/702

zefhemel commented 4 months ago

Also related: https://github.com/silverbulletmd/silverbullet/issues/692

NeilHanlon commented 3 months ago

I am in support of this idea--specifically one of my use cases is that I often create diagrams using PlantUML and/or Mermaid syntax, and being able to display those full-screen (or side-by-side..) would be a great addition which I could implement in some way with this styling.

zefhemel commented 3 months ago

This is now implemented by @onespaceman