Line spacing in forum topics

Just wondering whether folks would be agreeable to the idea of increasing the line height in the body of forum posts. The new darktable 2.4.0 rc2 announcement (link below) contains several long bulleted lists, and my eyes found it a bit difficult to stay on track while reading them. The inspector in Firefox shows:

font-size: 14px;
line-height: 19px;

Changing the line-height from 19px to 25px made the lists much easier to read for me. I’d be interested to know whether others feel the same way, and if so whether this would be an acceptable change.

Edit: added a list to this post as a test.

  • `Twas brillig, and the slithy toves
  • Did gyre and gimble in the wabe:
  • All mimsy were the borogoves,
  • And the mome raths outgrabe.

Notice below that the actual problem is the vertical spacing between the li elements, not the line-height; this spacing is less than the spacing between the wrapped text lines. I normally add an additional line between the lis to improve readability.

Without Additional Line

  • Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  • Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

With Additional Line

  • Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. See, much better.

  • Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

1 Like

What @afre said. It’s the list elements that make it hard on the eyes possibly. (Notice the lines in paragraphs in posts should be taller).

I too normally add extra space between li elements, and fully agree that the amount of space between li elements should be more than the amount of space between the lines of an individual li element. Having said that, I just made the quick temporary change to line height in the inspector in Firefox, and found that the paragraphs that were not part of lists were also more readable (for me personally anyway). I wasn’t able to fully investigate, because the inspector kept hanging when I was poking around (man, they really pooched up Firefox this time…over on my Windows box, it’s crashing every 3-5 interactions!). I’ll change the title for this thread to not specifically talk about line height, but line spacing in general. I won’t edit the first post, since that will destroy context for @afre and @patdavid posts.

1 Like

@elGordo Typographical metrics change depending on your system, browser and the site’s setup. On discuss, sometimes things don’t look right and then in a matter of hours look okay again. It is hard to tell what the causes are. E.g., at the moment, the g in the thread’s title is cropped at the bottom. I recall that it wasn’t like that at one point.

What I can say right now is that the lines within a paragraph are a bit close in Firefox desktop (win7) but just right in Firefox mobile. I would suggest going in Reader View but for some reason I cannot find it at the moment in Firefox desktop. It was around before the latest redesign… Oh, it just showed up at the far right end of the address bar, weird!

Last point is that typography online is hard. I would recommend that you use a custom style sheet if you want max control over your reading experience. In it I would use rems or ems instead of pxs.

I would also add that Ctrl + makes everything larger and Ctrl 0 returns it to it’s normal size.

1 Like

That is actually a bad idea. Adding empty lines results in <p> being added inside the <li>. Abusing paragraphs to space list items is not the right way. Fixing the CSS is. So I am all for increasing the line height.

3 Likes

Absolutely. I was suggesting additional space via CSS, not an additional line via inserting p elements. Furthermore, adding an additional line does nothing for the vertical spacing of the lines of an individual element that spans multiple lines.

I’ve got a few minutes to fiddle with this.

As @houz says, better usually not to abuse formatting elements if possible (it makes messy markup). (edit - apparently it’s in the spec, see loose vs. tight lists)

We have two main things that are different from a DOM perspective that we’re talking about.

  1. List elements <li> (which much of that darktable release post is) and the spacing between <li> elements. I can increase the bottom margin between list elements a little bit for a bit better breathing room. I’ll push something in a few minutes and edit this post when it’s live if y’all want to check it out.

  2. Paragraph elements <p> which make up the bulk of normal posts. Currently the line spacing for paragraphs is ~1.4em, which is a nice default I think. I don’t personally see a compelling reason to modify this, but I’m also not the only one using the forum. :wink: So I’m willing to be convinced.

To test, here’s a <ul> for reference:

  • First things first
  • I hope y’all appreciate just how hard we work on this stuff
  • Punks!
  • I blame @houz
  • I’m still on the fence about modifying this, please wait

if you increase the bottom margin for single li, you might have to increase it for whole lists as well. otherwise it might be hard to differentiate multiple lists.

  1. maybe i should actually use longer text for my test. so it can wrap lines and make them show as proper long list items.
  2. this is a test of the markdown rendering without any extra newlines between the list items as @patdavid had
  3. see no paragraphs mom.
  1. Once upon a midnight dreary while I pondered weak and weary over many a curious and quaint volume of forgotten lore. Suddenly there came a tapping as of someone gently rapping - rapping on my chamber door.
  2. Tis some wayward visitor I muttered only this and nothing more. I am running out of Poe references that I’ve memorised so we’re going to go with whatever is coming out of my slightly bent brain to see what happens.
  3. This is just another paragraph of stuff that I am including in this thing - there should be a question if the list element runs on this long if you should even be using a list in the first place? If you’re going to be this verbose perhaps it would make more sense to break this out into actual paragraphs and tighten up the list?
  4. with loose list items

In CSS, “li { padding: 0.25em; }” works well.

Funny bug: with just 1 item having a paragraph trigger inside all of them become paragraphs

  1. maybe i should actually use longer text for my test. so it can wrap lines and make them show as proper long list items.

  2. this is a test of the markdown rendering without any extra newlines between the list items as @patdavid had

  3. see no paragraphs mom.

  4. maybe i should actually use longer text for my test. so it can wrap lines and make them show as proper long list items.

  5. this is a test of the markdown rendering without any extra newlines between the list items as @patdavid had

  6. see no paragraphs mom.

I actually wanted it to be 2 lists.

so the solution is that houz just adds one extra \n in each list. and it will render them out as p elements :wink:

:smiley:

I’ve pushed a request upstream for a minor change in the default CSS:

We could also add this to a theme, as they support custom CSS.

You can now select the theme “white li spacing” which is the default white theme with 0.2em added to the li element.

I’m not seeing any difference in spacing with that theme.