Skip to content

Commit 1a8a6b3

Browse files
committed
Fix varying margins under headings
It seems that browsers add some special default styling to header tags :( I found that for smaller heading tags, like h5 could give more padding then h1 tags... To fix this, everything should now just recieve the theme standard of 24px bottom margin.
1 parent e24e502 commit 1a8a6b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sphinx_rtd_theme/static/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sass/_theme_rst.sass

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
// --------------------------------------------------------------------------------------------------------------------
1515
1616
.rst-content
17+
// Some browsers like to give arbituary margins :( make them all consistent.
18+
h1, h2, h3, h4, h5, h6
19+
margin-bottom: $base-line-height
20+
1721
// Sphinx by default applies HxW style attributes to images. This fixes that oversite.
1822
img
1923
max-width: 100%

0 commit comments

Comments
 (0)