10000 List markers overlap margin of inline elements · Issue #2554 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

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

List markers overlap margin of inline elements #2554

Closed
5 tasks done
ghost opened this issue Apr 12, 2021 · 3 comments
Closed
5 tasks done

List markers overlap margin of inline elements #2554

ghost opened this issue Apr 12, 2021 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@ghost
Copy link
ghost commented Apr 12, 2021

I've found a bug and checked that ...

  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When you add an inline admonition followed by a list (ordered or not), the list markers (numbers or bullets) are not affected by the margin of the admonition. Instead, it only applies to the <li> element.

I am pretty sure that this bug was introduced with 7.1.1 release, since I downgraded mkdocs-material to 7.1.0 and it was still fine. Users of the product I write docs for noticed the issue, and it turned out that the deployed version used 7.1.1 whereas the version in my Docker environment was still in 7.1.0.

The page that was affected also had some inline pictures, which used the .inline CSS class, so they were also affected by this bug.

Expected behavior

From local 7.1.0

image
image

Actual behavior

From deployed 7.1.1

image
image

Steps to reproduce the bug

  1. Upgrade to 7.1.1.
  2. Use a set-up like the one below.
  3. Serve the site, the bug exists.
  4. Downgrade to 7.1.0.
  5. Serve the site, the bug no longer exists.
!!! info inline "Inline admonition"
    This is some text.

- This is a list.
- This is a list.
- This is a list.
- This is a list.

Package versions

  • Python: 3.9.1
  • MkDocs: 1.1.2
  • Material: 7.1.0 (unaffected), 7.1.1 (affected)

System information

  • OS: Windows 21H1
  • Browser: Microsoft Edge (reported from Firefox too)
@squidfunk
Copy link
Owner

Thanks for reporting. Related change in c011da1 which fixed #2501 but introduced this problem.

@squidfunk squidfunk added the bug Issue reports a bug label Apr 12, 2021
@squidfunk
Copy link
Owner

Potential fix in 21b543a. I believe it's safe to add back flow-root to ul and ol elements, as my testing shows that the bottom margin compounding reported in #2501 does not occur with them.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Apr 15, 2021
@squidfunk
Copy link
Owner

Released as part of 7.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

1 participant
0