Reputation: 3252
Using the package prettydoc
in R Markdown, there is a template, the code is below
---
title: Nineteen Years Later
author: Harry Potter
date: July 31, 2016
output:
prettydoc::html_pretty:
theme: cayman
highlight: github
---
The output look likes this
Was wondering where I would be able to change the colors that transcend, so maybe it could go from a red to orange or anything I declare. Where is the .css for this header located? Thank you in advance
Upvotes: 3
Views: 1922
Reputation: 2821
The easiest way is to override the Bootswatch Cayman theme CSS.
To get the default values of the linear-gradient()
CSS function, responsible for "a progressive transition between two or more colors along a straight line" you may "right-click an element on a web page and select Inspect Element":
Was wondering where I would be able to change the colors that transcend, so maybe it could go from a red to orange...
So, applying CSS Linear Gradients Syntax:
background-image: linear-gradient(direction, color-stop1, color-stop2, ...);
---
title: Nineteen Years Later
author: Harry Potter
date: July 31, 2016
output:
prettydoc::html_pretty:
theme: cayman
highlight: github
---
```{css my-header-colors, echo = FALSE}
.page-header {
background-image: linear-gradient(120deg, red, orange);
}
```
Where is the .css for this header located?
Github: https://github.com/yixuan/prettydoc/blob/master/inst/resources/css/cayman.css
Windows (PC): ..\R\win-library\4.0\prettydoc\resources\css\cayman.css
Does this help in any way?
Upvotes: 7