-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add site themes #185
Add site themes #185
Conversation
Merge branch 'master' of github.com:rstudio/distill into add-site-themes # Conflicts: # inst/rmarkdown/templates/distill_article/resources/base-variables.css
I think it's fine to include the site variables if you: a) Keep them at the bottom; and b) Put a comment above them that say they only affect sites not standalone articles Unrelated question: are we going to allow customization of fonts here as well? |
Do you think there could be a lightweight way to link up to Google fonts? Some related packages: And it looks like @rich-iannone has a google font helper function in gt: I could see specifying a header font, body font, and code font, if you wanted to go that far. Here is an example from a
|
Could the user just import those fonts right in their theme file and then assign them to variables? |
If that's a bit unwieldy for any reason we could also support a "theme.fonts" file alongside the "theme.css", but I think unless it's really problematic to include the fonts inline it would be cleaner to have it in one file. |
Thinking through this more, this is "easy" to add to the
And then use them in the CSS by adding to the
The harder bit is figuring out how to get each font imported. We may have to ask users to add that to the CSS themselves, like:
harder b/c fonts with spaces have a
|
I think users can get pretty far with just generally available fonts (I believe but could be wrong that Distill itself doesn't import any Google fonts). We could just point to some documentation on what fonts can be generally relied on. Also Google has this font import tool that should build the right |
Hi @jjallaire, I edited the structure of the theme file to use less global CSS properties and try to locally scope some of them. Happy to return to previous structure too, as this one looks a lot longer, but may be easier to explain/document: |
Hi @jjallaire,
I'm reasonably happy with these additional CSS variables, and needed to adapt some of the base styles to make them all work well with the blog listing pages. I'm unsure where to actually put these new variables, because I think users may be confused and/or overwhelmed if they create an article and see the additional website variables populate in the
theme.css
. Marking this PR as a draft if you can advise!Alison