3

I want to control the author and date text in xaringan rmarkdown with a css file?

I tried with

.title-slide h3 {
  font-weight: normal;
  font-size: 40px;
  color: grey;
  background-color: white; }

But apparently this control both, the author and date together, but they stay on top of each other (at the same position).

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419

1 Answers1

11

By default, the author is the first h3, and the date is the second h3, so you can use the CSS selector nth-of-type on the title slide, e.g., color the author to red, and date to gray:

.title-slide h3:nth-of-type(1) {
    color: red;
}
.title-slide h3:nth-of-type(2) {
    color: gray;
}
Yihui Xie
  • 28,913
  • 23
  • 193
  • 419