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

👌 IMPROVE: Change CSS to remove extra white-space in panel #143

Closed
wants to merge 1 commit into from

Conversation

foster999
Copy link
Collaborator

@foster999 foster999 commented Oct 1, 2021

Some themes pad paragraph elements with a bottom-margin. This change removes that margin when p element is within a panel.

Fixes #139

@codecov
Copy link

codecov bot commented Oct 1, 2021

Codecov Report

Merging #143 (c104e79) into master (ade8d9c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #143   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files           2        2           
  Lines         219      219           
=======================================
  Hits          202      202           
  Misses         17       17           
Flag Coverage Δ
pytests 92.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ade8d9c...c104e79. Read the comment docs.

@reiyw
Copy link
Contributor

reiyw commented Jun 30, 2022

I was just investigating this issue as well #168. It turns out that removing the bottom margin of all p elements in a panel would break the spacing between content (at least in sphinx-rtd-theme).

On the master branch:
image

With this change:
image

Also, elements generated by the code-tab directive do not include the p element, so that CSS is not applied.

A way around these problems is to set the bottom margin for the last child of the element in the panel.

.sphinx-tabs .sphinx-tabs-panel *:last-child {
    margin-bottom: 0;
}

However, this breaks the spacing in the alabaster theme, as shown in #168, so I think a more general solution is needed.

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

Successfully merging this pull request may close these issues.

Empty space at the end of tabs
2 participants