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

feat: add new setting to select line height options #3034

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shuuji3
Copy link
Member

@shuuji3 shuuji3 commented Oct 31, 2024

resolve #3007

This PR implements a new setting to select line height in the post body. Users can choose the narrower (1.2) or wider (1.5) line height options, in addition to the current normal option (4/3)

Screenshots

Setting section for line height

Screenshot of Setting section for line height

Narrow (1.2)

Screenshot of the post with narrow line height

Normal (4/3 = 1.33...): current and default value

Screenshot of the post with normal line height

Wide (1.5)

Screenshot  of the post with wide line height

Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for elk-docs failed.

Name Link
🔨 Latest commit b24b53c
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/67248c38ec14a900084f7afc

Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit b24b53c
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/67248c3879b783000826ee37
😎 Deploy Preview https://deploy-preview-3034--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@iconify/[email protected] None +1 366 MB cyberalien

🚮 Removed packages: npm/@iconify/[email protected], npm/@iconify/[email protected]

View full report↗︎

@@ -125,8 +125,16 @@ em-emoji-picker {
}
}

.line-compact {
line-height: calc(4 / 3 * 1em);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the unit em following the recommendation by MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#values):

In most cases, this is the preferred way to set line-height and avoid unexpected results due to inheritance.

@shuuji3 shuuji3 marked this pull request as ready for review November 1, 2024 09:42
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

Successfully merging this pull request may close these issues.

Make line height configurable
1 participant