Home > Enterprise >  How to format tabset font in Quarto?
How to format tabset font in Quarto?

Time:08-31

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)

```
:::

CodePudding user response:

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


  • Related