Home Comments Thread
New Thread

Full-width Figures with Two Lines of CSS - width: 100vw and margin-left: calc(50% - 50vw) | /en/2021/06/css-full-width/

yihui yihui 2022-12-17 06:26:27

Full-width Figures with Two Lines of CSS - width: 100vw and margin-left: calc(50% - 50vw)

https://yihui.org/en/2021/06/css-full-width/

1 Comment

giscus-bot giscus-bot 2022-12-17 06:26:28
Guest *Nicholas Tierney* @ 2021-06-24 02:18:15 originally posted:

This is awesome, Yihui! I've often dreamed of this.

Is there a way to tell Rmd chunks to generate this CSS? Similar to how the full-width images can be turned on for tufte? I'm just curious, as I couldn't find your .Rmd that produced this page.

Thanks again!

yihui yihui 2022-12-17 06:26:28

Yes, I showed an Rmd example in the SO answer: https://stackoverflow.com/a/67644121/559676 This was mentioned as the first link in my post above, but I guess it was not obvious.

I just re-read my SO answer and I feel there can be a cleaner solution. I'll experiment and update the answer accordingly in a minute.

Originally posted on 2021-06-24 04:18:26

giscus-bot giscus-bot 2022-12-17 06:26:29
Guest *Nicholas Tierney* @ 2021-06-25 00:51:19 originally posted:

Ah, fantastic! Thanks, Yihui! :)

Sign in to join the discussion

Sign in with GitHub