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 3 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 canceled.

Name Link
🔨 Latest commit 66d13f7
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/67639f02701dd50008563969

Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 66d13f7
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/67639f0277c3d30008c490a9
😎 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.

@shuuji3 shuuji3 force-pushed the shuuji3/feat/line-height branch from 26b8f6b to b24b53c Compare November 1, 2024 08:07
Copy link

socket-security bot commented Nov 1, 2024

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

Package New capabilities Transitives Size Publisher
npm/@iconify/[email protected] filesystem +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