I would like to add a css class to a specific cell in my flexdashboard so that a large image is not rescaled and can be scrolled down on the y-axis.
I tried to add a custom css class to the code chunk via class.source="yscrollable" (based on this tutorial) without success. class.output="yscrollable" or class="yscrollable" do not work either. Moreover, the css class does not even show up in the html/css output.
This is my script so far:
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
<style>
.yscrollable {
overflow-y: scroll !important;
}
</style>
# Section
## Column
### Cell
```{r class.source="yscrollable", fig.height=20}
plot(1:100)
```
I am aware I could set vertical_layout = scroll, but my point is to modify a single cell.
Note: For some reason, when I reduce my web browser window size, a y-scroll shows up and the figure is displayed in its original scale.





