Skip to content

How to set the output size of slides to 1:1(square)? #151

Answered by yhatt
samko5sam asked this question in Q&A
Discussion options

You must be logged in to vote

By a technical limitation, overriding width and height declarations for section elements through <style> is not working, as you have tried.

You can use custom slide size by using custom theme CSS.

/* @theme square */

@import 'default';

section {
  width: 720px;
  height: 720px;
}
---
theme: square
---

# Slide title

See a documentation of your using tool about how to apply a custom theme CSS: https://github.com/marp-team/marp-cli#use-custom-theme (Marp CLI) and https://github.com/marp-team/marp-vscode#use-custom-theme-css-%EF%B8%8F (Marp for VS Code)

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@imflash217
Comment options

@imflash217
Comment options

@yhatt
Comment options

@yoonjong-park

This comment was marked as spam.

Answer selected by yhatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants