damiankorcz / Prism-Theme

A Comprehensive, Highly-Customisable and Elegant Light/Dark Theme for Obsidian.md
https://www.buymeacoffee.com/DamianKorcz
MIT License
369 stars 13 forks source link

How to change the line (*** or ---) spacing between "Reading" view and "Live preview" view to be the same? #165

Closed Rivol0gY closed 3 months ago

Rivol0gY commented 3 months ago

I'm used to add a line (*** or ---) below a heading and it renders perfectly in "Live preview" view with no additionnal spacing: Live Preview

Once I toggle to "Reading" view, it adds a spacing that I would like to remove: Reading

I would like to have the same behavior between "Live preview" and "Reading" view.

I'm presuming that a slight tuning of the CSS code is sufficient to remove the spacing / padding in "Reading" view.

Is it possible to add it as a feature or explain it in the documentation?

Thanks a lot for your understanding.

PS: I pasted two images, the first one is in "Live Preview" and the other is in "Reading" view.

damiankorcz commented 3 months ago

Hi @Rivol0gY, I'll reduce the distance in reading mode a little in the coming update (same value as below). If you want to adjust it to your liking you'll need this in a CSS snippet:

hr {
    margin: 1.5em 0;
}

Reading mode renders your files quite a bit differently to how Source / Live Preview do so you will never get it exactly the same for a lot of elements. I always try to get it as close as I can.

Rivol0gY commented 3 months ago

Hi @damiankorcz,

Many, many thanks for your quick feedback. It is well appreciated.

Based on your feedback, I realized that we can modify nearly everything quite easily!

In order to get the same look and feel as the "Reading" view, I found the following combination:

hr {
    margin: 0.75em 0;
}

Once again, thanks a lot for your reactivity and have a nice day!

damiankorcz commented 3 months ago

Hi @Rivol0gY, This issue should now be resolved in Prism 3.5.2. I've changed the values to what I mentioned above. If you want to keep the margins slimmer then do keep using your CSS snippet.