marp-team / marp-core

The core of Marp converter
MIT License
784 stars 132 forks source link

Vertical fit #197

Closed harsh183 closed 1 year ago

harsh183 commented 4 years ago

I use marp for a lot of programming related presentations but sometimes what happens is that slides get too long vertically. The elements adjust well based on horizontal line size but I can't figure out a way to do this from reading all the docs and example decks.

Sometimes I end up removing titles and other text to push to another slide but I think I'd prefer it if it scales the slide vertically over having a cut out at the top and bottom.

yhatt commented 4 years ago

In the context of framework, fitting contents will break DOM structure of rendered Markdown, and it brings broken theme due to unmatched CSS selectors. Probably discussing on Marp Core repository instead of Marpit is better.

I think vertical scaling is very difficult on HTML because contents on the Web are generally scalable into vertically.

I've once tried vertical scaling on Marp Core, but the shrinked content makes extra space(s) in the side. I felt sort of weird like pushed in contents of the page, and smaller fonts would be hard to read from the point of view of audience.

StackOverflow has a JS-based solution by changing font-size dynamically (https://stackoverflow.com/a/40709829). However, we don't take this by several reasons:

harsh183 commented 4 years ago

What about just having code blocks itself scale? Like not the slide itself but having it scale down. How do you set up settings for code blocks, the docs aren't the most clear?

# <!-- fit --> Heading

Stuff like this is fine, what about code blocks?

yhatt commented 1 year ago

Housekeeping 🧹