How do you specify this in your YAML header ? The CSS rule should work ok.
It works if I used css chunk to change style from within the document
---
title: "Changing CSS"
output:
xaringan::moon_reader: default
---
```{css, echo = FALSE}
body {
color: red;
}
```
# Hello
Some content
---
# Hello 2
Another Content

You could be interested in this package to style xaringan presentation