Skip to content

Commit

Permalink
spacing in admonitions (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf authored Jun 22, 2020
1 parent 79bfd3a commit b4a670f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
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

0 comments on commit b4a670f

Please sign in to comment.