Skip to content

Commit

Permalink
fix(article): also define the padding for div under .article-content (C…
Browse files Browse the repository at this point in the history
…aiJimmy#162)

Fixes rstudio/blogdown#591: not only `<p>` but also `<div>` could be the direct child of `.article-content`, so we also need the padding for `<div>`. The `div`s are generated by Pandoc, instead of Hugo's Markdown renderer. I think it will be great to support both ways.
  • Loading branch information
yihui authored and rinav committed Apr 23, 2021
1 parent d1c9853 commit 6d38c10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/scss/partials/layout/article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@
font-size: var(--article-font-size);
line-height: var(--article-line-height);

& > p {
& > p,
& > div {
margin: 1.5em 0;
padding: 0 var(--card-padding);
}
Expand Down

0 comments on commit 6d38c10

Please # to comment.