Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Rivol0gY opened this issue May 15, 2024 · 3 comments
Assignees
Labels
Feature Request Enhancement and/or Feature suggestion

Comments

@Rivol0gY
Copy link

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.

@Rivol0gY Rivol0gY added the Feature Request Enhancement and/or Feature suggestion label May 15, 2024
@damiankorcz
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Enhancement and/or Feature suggestion
Projects
None yet
Development

No branches or pull requests

2 participants