Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document need for @import 'https://fonts.googleapis.com/css?family=Font'; #171

Open
Robinlovelace opened this issue Apr 9, 2020 · 1 comment

Comments

@Robinlovelace
Copy link

I followed the advice in https://pagedown.rbind.io/#the-css-overriding-mechanism but my font would not change. Having played around a bit with the settings and the CSS I realised that I needed to add

/* font location goes here:*/
@import 'https://fonts.googleapis.com/css?family=Comic+Neue';

Before the body to made the font available.

The whole of the CSS for custom font now looks like this:

/* font location goes here:*/

@import 'https://fonts.googleapis.com/css?family=Comic+Neue';

body {
  font-family: "Comic Neue";
}

I'm pretty sure this should be documented. Will put in a Pull Request to do so!

Great package by the way guys, although I do think more documentation would help people new to CSS like me (and probably most people coming across the package).

Robinlovelace added a commit to Robinlovelace/pagedown that referenced this issue Apr 9, 2020
@Robinlovelace
Copy link
Author

Update, I've had a first go at fixing this documentation issue (see PR above).

See attached for reproducible experiments showing that the suggested steps, which omit mention of @import do not change the text, which could confuse people.
pagedown-tests.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant