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

width of center column and its position #7

Closed
saptarshiguha opened this issue Jul 6, 2018 · 3 comments
Closed

width of center column and its position #7

saptarshiguha opened this issue Jul 6, 2018 · 3 comments

Comments

@saptarshiguha
Copy link

Hello,
Thank you for creating this. it's very nice indeed. I do have two questions,

  1. is there a way to change the width of the main text column? it would be nice if i could make it say 10-20% wider (and everything els changes accordingly)

  2. can we make the text column left aligned, i.e. move the column to the left of the page rather than dead center?

Much thanks

@jjallaire
Copy link
Member

To do this you need to use CSS grid (you can provide a custom stylesheet via the css YAML option). Here is where we establish the layout for 1000 pixels and higher (actually, there is another layout for > 1280 pixels which you'd potentially also need to tweak):

https://github.com/radixpub/radix-r/blob/master/inst/rmarkdown/templates/radix_article/resources/distill.html#L149-L176

There are 2 reasons that the center column is narrow:

  1. Ergonomics of reading are much better with a narrow column (one of the reasons that newspapers use narrow columns). See also medium.com layout upon which Radix was to some extent based: https://medium.freecodecamp.org/how-to-write-bulletproof-code-in-go-a-workflow-for-servers-that-cant-fail-10a14a765f22

  2. To leave some room in the margin for asides and figures.

@saptarshiguha
Copy link
Author

I agree a narrow column is more readable than a wide one, but i would like mine to fit in a few extra (maybe 3-4) words at convenient font size.

thanks much for the pointers

@jjallaire
Copy link
Member

It's certainly possible that our default width isn't ideal. Let me know what you come up with and we can either evaluate changing our default or providing a top-level option for another layout variation. As I said there is another layout that comes into play at >= 1180px but this CSS wasn't currently visible. I've added it explicitly so that you can play with that as well:

https://github.com/radixpub/radix-r/blob/master/inst/rmarkdown/templates/radix_article/resources/distill.html#L178-L198

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

2 participants