Skip to content

How to create a theme? #115

Answered by yhatt
kecrily asked this question in Q&A
May 19, 2021 · 4 comments · 15 replies
Discussion options

You must be logged in to vote

https://marpit.marp.app/theme-css is only describing about the thinking of theme CSS syntax. To use your own theme actually, you have to register the custom CSS theme in your VS Code workspace: https://github.com/marp-team/marp-vscode#use-custom-theme-css-shield

Tutorial

  1. Create a folder for working and open the folder in VS Code.

  2. Put theme.css into the created folder. It makes a theme named "your-theme".

    /* @theme your-theme */
    
    @import 'default';
    
    h1 {
      color: red;
    }
  3. Put markdown.md into the created folder.

    ---
    marp: true
    theme: your-theme
    ---
    
    # Hello, world!
  4. Hit F1 and run "Preferences: Open Workspace Settings".

  5. Search "Themes" and find out Markdown > Marp: Themes.

  6. Add a p…

Replies: 4 comments 15 replies

Comment options

You must be logged in to vote
8 replies
@calidion
Comment options

@yhatt
Comment options

@Doyoulikemilk
Comment options

@zrxdaly
Comment options

@yhatt
Comment options

Answer selected by kecrily
Comment options

You must be logged in to vote
5 replies
@yhatt
Comment options

@calidion
Comment options

@calidion
Comment options

@yhatt
Comment options

@calidion
Comment options

Comment options

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

Comment options

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

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