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

Not enough space between list items #47

Open
cool-RR opened this issue Jun 18, 2020 · 8 comments
Open

Not enough space between list items #47

cool-RR opened this issue Jun 18, 2020 · 8 comments

Comments

@cool-RR
Copy link

@cool-RR cool-RR commented Jun 18, 2020

See this screenshot for documentation that I'm writing as part of PEP 618:

1

The list item to the right of the cursor is awkward. I think there should be more space between it and the one above it.

@JulienPalard
Copy link
Member

@JulienPalard JulienPalard commented Jun 22, 2020

This is probably rendered as two distinct lists, can you share the rst we can take a look? Also can you check in the DOM if you see two distinct lists?

@cool-RR
Copy link
Author

@cool-RR cool-RR commented Jun 23, 2020

This has now been merged into Python, so you can see it live here:

https://docs.python.org/3.10/library/functions.html#zip

And you can see the source here: https://raw.githubusercontent.com/python/cpython/master/Doc/library/functions.rst

Search for "Shorter iterables can be padded"

@cool-RR
Copy link
Author

@cool-RR cool-RR commented Jun 23, 2020

Looking at the DOM, I'm not seeing two distinct lists.

@hugovk
Copy link
Contributor

@hugovk hugovk commented Sep 16, 2020

There's extra space between the first and second bullet points because the first one ends with a code block.

Code blocks comes with extra CSS to add space below as part of its div and pre.

To demonstrate, deleting it shows the usual small gap between bullets:

Before After deleting the code block from the DOM
image image
@cool-RR
Copy link
Author

@cool-RR cool-RR commented Sep 16, 2020

@hugovk I understand, and what I'm saying is that there should be more vertical space between list items, regardless of whether they have code blocks in them or not. This is similar to how there's vertical a space between paragraphs. It helps to tell things apart at a glance.

@hugovk
Copy link
Contributor

@hugovk hugovk commented Sep 16, 2020

Right, there's 1em margin below the code blocks, perhaps something like this would help?

li {
    margin-bottom: 1em;
}
Before After
image image
@cool-RR
Copy link
Author

@cool-RR cool-RR commented Sep 16, 2020

Yes, that's perfect.

@JulienPalard
Copy link
Member

@JulienPalard JulienPalard commented Oct 8, 2020

I have a vague, old, souvenir of a time where list composed of only small sentences were not spaced, and list composed of long strings were spaced.

IIRC this "feature" was removed because it caused strange visual inconsistencies, typically when a long list had a single long element, triggering the "need spacing" thing.

So ensure it renders correctly for lists of short sentences, like:

  • PEP 584, union operators added to dict;
  • PEP 585, type hinting generics in standard collections;
  • PEP 614, relaxed grammar restrictions on decorators.

and don't resurect the old bug :) (I searched here, in my emails, and on bugs.python.org and can't find where the issue was reported and fixed, sry. If someone remembers something... please link!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.