Ask Your Question
2

Is there a way to alter the font size for the title and tabs when utilizing a bslib theme?

asked 2022-12-28 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-08-10 23:00:00 +0000

ladyg gravatar image

Yes, you can use custom CSS to alter the font size for the title and tabs when using a bslib theme. Here's an example:

```{css} /* Change font size of title */ .bs-header .navbar-brand { font-size: 2rem; }

/* Change font size of tabs */ .nav-item { font-size: 1.2rem; }


You can include this CSS code in your R Markdown document using the `css` chunk option:

```{css, echo=FALSE}
/* CSS code here */

Alternatively, you can create a separate CSS file and link to it in your document's YAML header:

output:
  html_document:
    theme: bootswatch::yeti
    css: styles.css

In this case, the CSS code would be in the "styles.css" file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-12-28 11:00:00 +0000

Seen: 12 times

Last updated: Aug 10 '21