Yihui Xie

A Twist of Hygge in xaringan

Yihui Xie / 2018-02-19

Claus recently contributed an interesting CSS file to the xaringan package. Through his pull request, I learned a lovely new word, “hygge”. For those who don’t know it, the flavor of Markdown in remark.js, on which xaringan is based, supports the syntax .foo[text] (translated to <span class="foo">text</span>, or <div>...), which is very neat. This is the first time a user has contributed some CSS making use of this syntax. I loved his design.

This “theme” (not really a theme) is available with the name “hygge” in the development version of xaringan, which should be on CRAN soon (v0.6). To enable it, add hygge to the css option, e.g.,

    css: ["default", "default-fonts", "hygge"]

A few screenshots provided by Claus (and a full example):

colored content boxes

fancy picture effects

I called for help with new CSS themes in xaringan last time, and have received a few interesting contributions. Big thanks to those who helped (Alison for rladies, and Patrick for metropolis, etc)!