python / python-docs-theme

Sphinx theme for Python documentation
Other
75 stars 58 forks source link

Lack of margin when code block ends a section #59

Closed m-aciek closed 1 year ago

m-aciek commented 3 years ago

All browsers lack a margin when code block ends a section:

Zrzut ekranu 2020-11-21 o 11 39 06

Compare with margin at the end of section which ends with \<p> block:

Zrzut ekranu 2020-11-21 o 11 39 49

All browsers set margin-top and margin-bottom on p to 1em. So the fix is setting margin-top and margin-bottom on div.highlight analogously to 1em. But I am not sure if it is to be fixed in this or in parent theme (Sphinx's classic).

div.highlight {
    margin-top: 1em;
    margin-bottom: 1em;
}

Does someone know where to fix it?

m-aciek commented 1 year ago

It appears to be fixed apparently, I wasn't able to reproduce it. https://docs.python.org/3/tutorial/introduction.html