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

spacing in admonitions #207

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pydata_sphinx_theme/static/css/index.css

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions src/scss/_admonitions.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
// Admonitions CSS inspired by https://squidfunk.github.io/mkdocs-material/getting-started/
.admonition {
margin: 1.5625em 0 !important;
padding: 0 .6rem !important;
width: 95%;
margin: 1.5625em auto;
padding: 0 .6rem .8rem .6rem !important;
overflow: hidden;
page-break-inside: avoid;
border-left: .2rem solid $blue;
border-radius: .1rem;
box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,.05), 0 0 0.05rem rgba(0,0,0,.1);
transition: color 250ms,background-color 250ms,border-color 250ms;

// Last paragraph should have same spacing as title
p:last-child {
margin-bottom: 0.4em;
// Last item should have no spacing since we'll control that w/ padding
*:last-child {
margin-bottom: 0;
}

// Items after the title should be indented
p.admonition-title ~ * {
padding: 0 1.4rem;
}

// Defaults for all admonitions
Expand Down