Excessive spacing in Wagtail header formatting
Closed this issue · 13 comments
Description
There is an issue with the formatting of headers (H1, H2, H3 etc) in Wagtail. There appears to be inconsistent and excessive spacing in two key areas:
- Between Headers - the spacing between different headers (H1, H2, H3 etc) is larger than expected, disrupting the flow and readability of the content
- Between Text and Headers - there is excessive space between the end of a text block and the subsequent header, leading to a disjointed visual presentation
Expected Behavior
The spacing between headers and between text and headers should be uniform and adhere to standard web content formatting practices. This ensures a cohesive, visually appealing layout that enhances readability.
How it looks like now
@alexmorev @Alex-Pavlyuk hey guys! first, happy new year! ; )) may your debug sessions be short, your coffee/tea strong, and your connections with others meaningful! second, can you look into that? : )) thanks!
@popovayoana we will start to work on it soon
@popovayoana it is changed now pls check
@Alex-Pavlyuk great job so far! just a couple of quick things to tweak:
- headings size: H3, H4, and H5 look almost the same size right now... H3's a bit different in color and padding, but could we make them more distinct in size?
- padding: let's match the padding with the heading sizes - it'll look neater that way...
@popovayoana It's done. Please check. Waiting for your feedback.
@alexmorev nothing has changed for me so far... 😕 should I wait a bit? I'm testing with this article: https://ckan.org/admin/pages/376/view_draft/
@popovayoana Fixed. Please re-check.
@alexmorev the header font size is perfect! we just need to tweak the line height for h2, h4 and h5. not super sure but I'm leaning towards maintaining a consistent 4px difference between font size and line height. why 4px? - it's already looking good on h1 and h3, unless I'm mistaken
here’s a tentative suggestion (but please, apply your expertise to adjust as you see fit - h4 and h5 should be slightly decreased and h2 very tiny-tiny increased):
- for h2, now at Size 40px and Line Height 42px → Let's try Line Height to 44px
- for h4, now at Size 28px and Line Height 42px → Let's try Line Height 32px
- for h5, now at Size 24px and Line Height 36px → Let's try Line Height 28px
@popovayoana Changed. Please check and give your feedback.
@alexmorev @Alex-Pavlyuk everything looks good overall, but I've noticed an issue with the font size of hyperlinks in the titles. when inserting a link into the titles, the links appear with a smaller font size compared to the rest of the text.
here is an image for reference:
you can see the problem in the preview link: https://ckan.org/admin/pages/380/edit/preview/?mode=
Additionally, there is one more minor thing: the font size of H6 in the admin panel is too small:
@alexmorev and one more thing... can we adjust the kerning (letter spacing) for all H1 to H6 headings to improve readability? the current kerning in the H1 to H6 headings is too tight, making the text appear cramped and less readable. I am not sure how to give you proper instructions because I don't know the exact current letter spacing, but it looks too tight and needs to be loosened up... wdyt?
fixed @popovayoana pls check
@Alex-Pavlyuk closing as FIXED. works perfect! 🤗