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

Set line-height? #37

Closed
karlhorky opened this issue May 20, 2019 · 3 comments
Closed

Set line-height? #37

karlhorky opened this issue May 20, 2019 · 3 comments

Comments

@karlhorky
Copy link
Contributor

karlhorky commented May 20, 2019

Hey there! Would this project be open to instituting a fixed line-height (maybe configurable?) to make rendering across different fonts / browsers more consistent? Not sure how out of date the information is, but I've been reading some articles that line-height: normal is not the same across browsers. I would also find this useful to be able to position elements relative to each line more consistently.

Prism has made the decision to use line-height: 1.5 for all themes (Ref: PrismJS/prism#279). 1.5 seems a bit excessive, especially with the more minimal Menlo font-family, which is the default used by the default code-surfer configuration. Prism uses Consolas as the default when visiting the website on macOS, which both has a higher default line-height (with line-height: normal) and looks better like this.

Below is a comparison of the following:

  • yellow Header: the default Menlo with line-height: normal (which resolves to 1.2 in Chrome macOS)
  • orange Header: Prism's website, using Consolas and line-height: 1.5

Kapture 2019-05-20 at 12 20 37

For a further reference, HTML Boilerplate currently uses 1.4.

I am not actually all into this topic, so I may miss out on downsides or complexities involved in this.

cc @pomber

@karlhorky
Copy link
Contributor Author

@carbonrobot is this really completed? Where can we see the documentation of this feature?

@carbonrobot
Copy link
Contributor

carbonrobot commented Feb 7, 2024

This library is just a React extension for Prismjs to make the setup a little easier. At this time, we don't want to support anything custom over what prismjs does by default unless neccessary.

@karlhorky
Copy link
Contributor Author

Ok, thanks for the reply. Maybe technically it should be closed as "Not planned" then.

@carbonrobot carbonrobot reopened this Feb 7, 2024
@carbonrobot carbonrobot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants