-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
do not cut off bottom portion of text #2568
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
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
7211041
to
81a470e
Compare
81a470e
to
87ed516
Compare
Thanks for your contribution. But I think this is by design, and you can modify it through the theme properties. :root {
--heading-line-height: normal;
} |
I'd tend to include this fix, as by default I would expect line-height to be automatic by default in all Browsers and not require additional changes. |
87ed516
to
9ddb2e6
Compare
@sy-records ah, thanks; I did not check for an existing variable. I set the global variable and it did indeed fix the problem but as @paulhibbitts commented, I would expect the text to look correct by default in all browsers. I've moved the change to be the default |
Thanks @dajrivera , now that I think about it I may also have run across this issue earlier when trying different fonts out with v5 and noticing I needed to then further adjust line-height to avoid slight cut-off one some particular ones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* calculation must use units; 'normal' value breaks calculation * replace --header-line-height variable with line height unit (lh) * introduce line heigh multiplier to reduce or increase line height
@sy-records looks like the h2 bottom-margin is calculated and was the reason for the prior "Unit required" comment; using value normal here broke that calculation. I've updated the bottom-margin calculation using the line height unit instead. At this point the bottom margin was too large so I included a local line-height-multiplier to reduce the margin size as a workaround. Let me know if you can think of a better alternative or a more appropriate method to implement this. Looks good to me in Edge. I can test Chrome, Firefox, and Safari tomorrow. |
Good catch @sy-records , my apologies for not viewing additional pages in the PR preview... I will be more careful in the future. From my perspective I hope that the resulting spacing unit adjustments match the spacing as originally specified by John Hildenbiddle as much as possible. |
Summary
The bottom portion of texts get cut off on Edge, Chrome, & Firefox; this issue does not appear in Safari. Using CSS property
line-height: normal
seems to fix the issue and does not affect Safari's rendering of the page.before:

after:

Related issue, if any:
N/A
What kind of change does this PR introduce?
Other: minor UI fix
For any code change,
Does this PR introduce a breaking change?
No
Tested in the following browsers: