Skip to content

Commit

Permalink
Correctly load glyphicons in dropdown tabset
Browse files Browse the repository at this point in the history
This will insure it works in `self_contained: false` and also simplifies the CSS. Closes #1697

Cheatsheet for Glyphicons: https://glyphicons.bootstrapcheatsheets.com/
  • Loading branch information
cderv committed Oct 3, 2022
1 parent 70d5712 commit 86c364c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: rmarkdown
Title: Dynamic Documents for R
Version: 2.16.1
Version: 2.16.2
Authors@R: c(
person("JJ", "Allaire", , "[email protected]", role = "aut"),
person("Yihui", "Xie", , "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0645-5666")),
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ rmarkdown 2.17

- `rmarkdown::render_site()` will now also look for `index.rmd` in addition to `index.Rmd` for custom site generator in YAML with `site:` (thanks, @kamalsacranie, #2409).

- Icons in tabset dropdown are now correctly shown, including when `self_contained: false` (thanks, @cpsievert, #1697).

rmarkdown 2.16
================================================================================

Expand Down
15 changes: 4 additions & 11 deletions inst/rmd/h/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,25 +321,18 @@
border-radius: 4px;
}

.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}

.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
content: "\e258";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
border: none;
}

.tabset-dropdown > .nav-tabs > li.active {
Expand Down

0 comments on commit 86c364c

Please sign in to comment.