Skip to content

Commit

Permalink
bs4_book(): Fix alignment of text blocks within rmdnote divs (rstud…
Browse files Browse the repository at this point in the history
…io#1175)

Co-authored-by: christophe dervieux <[email protected]>
  • Loading branch information
maelle and cderv authored Jun 29, 2021
1 parent 788c6d9 commit 9a7f33c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bookdown
Type: Package
Title: Authoring Books and Technical Documents with R Markdown
Version: 0.22.6
Version: 0.22.7
Authors@R: c(
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),
person("JJ", "Allaire", role = "ctb"),
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# CHANGES IN bookdown VERSION 0.23

- In `bs4_book`, math in footnotes is now rendered (@mine-cetinkaya-rundel, #1026)
- Style change in `bs4_book()` where code block inside callout blocks will have their background fill the whole width of the bordered block (#1175).

- In `bs4_book()`, math in footnotes is now rendered (@mine-cetinkaya-rundel, #1026)

- `repo` specification in `bs4_book()` can now be done in a more flexible way: base url, branch name, subdir and icon can be specify. See `?bookdown::bs4_book()` for details (thanks, @maelle, #1036).

Expand Down
8 changes: 8 additions & 0 deletions inst/resources/bs4_book/bs4_book.css
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@ body {
font-variant: small-caps;
}

/* special callout blocks */

.rmdnote, .rmdcaution, .rmdimportant, .rmdtip, .rmdwarning {
margin: 1rem calc(-2px - 0.5em);
padding: 1rem;
Expand Down Expand Up @@ -488,6 +490,12 @@ body {
border-color: var(--info);
}

.rmdcaution pre, .rmdimportant pre, .rmdnote pre, .rmdtip pre, .rmdwarning pre {
/* Make code blocks full width in rmdnote */
margin: 0 -1rem 1rem -1rem;
padding: 1rem;
}

main ul {
list-style-type: square;
}
Expand Down

0 comments on commit 9a7f33c

Please sign in to comment.