damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 416 forks source link

Google fonts in slides #499

Closed stoffprof closed 5 years ago

stoffprof commented 5 years ago

Is it possible to use Google fonts?

I thought perhaps I could put this in rise.css but it doesn't work as expected:

@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');

.reveal {
    font-family: 'Lato', sans-serif;
}

Thanks.

parmentelat commented 5 years ago

I’m not sure but you might need to use a more specific CSS selector

Like for any other page the javascript console and devel tools should give you valuable insights about the forces at work here

stoffprof commented 5 years ago

Thanks. This worked:

@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  font-family: 'Lato', sans-serif;
}