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

Definition List compounds bottom margin with each nested level #2501

Closed
5 tasks done
polarathene opened this issue Mar 29, 2021 · 2 comments
Closed
5 tasks done

Definition List compounds bottom margin with each nested level #2501

polarathene opened this issue Mar 29, 2021 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@polarathene
Copy link
Contributor

  • I've read the [contribution guidelines][1] and agree with them

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

With each nested level of definition list, the bottom margin seems to expand.

This appears to be due to display: flow-root (which the expected behaviour shows when removed). I'm not entirely sure why this rule is used to generate new block formatting context, so it's probably not a good solution (unless it were changed to not apply to nested children?).

The behaviour examples shown below is with excessive nesting. My actual use case is not as bad, but noticeable enough that I figured I should raise an issue about it.

Screenshot_20210329_154955

???+ info "Syntax"

    1. Declaration: `=== [tab-title]`

        `[tab-title]`
        
        : Provide a quoted string as the name of the tab. Markdown content is supported.

    2. Tab content is provided from the next line onward, assigned by indentation of 4 spaces.
    3. There should be a blank line before and after the tab content.
    4. Repeat steps for grouping additional content under related tabs.

Expected behavior

Screenshot_20210329_153248

Actual behavior

Screenshot_20210329_153025

Steps to reproduce the bug

  1. Enable and use the def_list markdown extension in mkdocs.yml.

  2. Add the markdown below to a doc page and build/preview the rendered output:

    a
    
    : b
    
        : c
    
            : d
    
                : e
    
    f

Package versions

Current release of the mkdocs-material Docker container.

Project configuration

Standard instance should do the trick, this is affected by mkdocs-material CSS.

System information

Manjaro Linux with Firefox.

@squidfunk
Copy link
Owner

Thanks for reporting. That shouldn't happen. I've added display: flow-root, so those elements won't bleed in to inline admonitions, but it appears that it's not necessary. I've removed it in c011da1. Let's see if that breaks something else.

@squidfunk squidfunk added bug Issue reports a bug resolved Issue is resolved, yet unreleased if open labels Mar 29, 2021
@squidfunk
Copy link
Owner

Released as part of 7.1.1.

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

2 participants