apprunner2186
apprunner2186

Reputation: 279

How to format tabset font in Quarto?

I have the below qmd file with 2 tabs. I'd like to change the tab text font style and size. How do I go about this?

---
title: "Cars"
title-block-banner: true
format: 
  html:
    code-fold: true
    page-layout: full
    fig_caption: yes
---
::: panel-tabset 
## MTCars

```{r}
head(mtcars)

```
## Cars

```{r}
head(cars)

```
:::

Upvotes: 4

Views: 1800

Answers (1)

Shafee
Shafee

Reputation: 19857

you can change the tab text font style by using css.

---
title: "Cars"
title-block-banner: true
format: 
  html:
    code-fold: true
    page-layout: full
    fig_caption: yes
---

```{css, echo=FALSE}
.panel-tabset .nav-item {
  font-size: 30px;
  font-style: italic
}
```


::: panel-tabset 
## MTCars

```{r}
head(mtcars)

```
## Cars

```{r}
head(cars)

```
:::

tabset with styled tab text


Upvotes: 4

Related Questions