Closed Doctor-love closed 2 years ago
It's a known limitation from CSS absolute positioning for header and footer (position: absolute
). Content-aware scaling is difficult in HTML rich contents (#197), and the slide author should reduce contents or change the style such as font-size
for the current slide.
Escape-hatch: In Marp Core v3, you can use <marp-auto-scaling>
custom element directly for down-scaling. Please enable HTML rendering in the Marp tool you are using. (--html
in Marp CLI)
---
header: test
footer: test
style: |
marp-auto-scaling[data-inside-container] > * {
min-width: 1280px;
}
marp-auto-scaling[data-inside-container]::part(svg) {
height: 600px;
}
---
<marp-auto-scaling data-inside-container data-downscale-only>
# Hello
Write your contents here
</marp-auto-scaling>
---
...
Awesome! Having more code lines is such a big help
Version of Marp Tool
Marp CLI v2.0.4
Operating System
Linux
Environment
How to reproduce
Expected behavior
Reserved space/margin for header and footer to fit content
Actual behavior
Slide content overlap with header and footer.
Example 1:![header_footer_overlap-1](https://user-images.githubusercontent.com/2008673/177164306-fe11b4b5-0a59-4ec6-ab12-26e20b9c4e1c.png)
Example 2:![header_footer_overlap-2](https://user-images.githubusercontent.com/2008673/177164384-03aa1c93-390e-43af-a3a2-0e2efd9c9b8e.png)
Additional information
The behavior has been observed in the exported PDFs (Chromium) and using Firefox. To reproduce, create and render a presentation using the following content presentation: overlap_demo.md