Skip to content

I can't figure out how to create vertical slides #356

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

You must be logged in to vote

You have to use custom theme CSS for changing the slide size. Take either of the following ways:

Set vertical slide as the default size (A way complied with Marpit framework)

Declare the width and height of the section element in your theme CSS to set the default size of the slide. Don't need to set size global directive in Markdown.

/* @theme vertical */

@import 'default';

section {
  width: 1080px;
  height: 1920px;
}
---
theme: vertical
---

# Vertical slide

Add "9:16" size preset to the theme (A way complied with Marp Core)

size global directive is a part of Marp Core extensions, not base framework Marpit.

If you want to allow choosing the vertical size from presets, declare @size

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eugenekudashev
Comment options

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