Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle additional features through theme metadata #72

Closed
yhatt opened this issue Feb 13, 2019 · 1 comment
Closed

Toggle additional features through theme metadata #72

yhatt opened this issue Feb 13, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@yhatt
Copy link
Member

yhatt commented Feb 13, 2019

Motivation

I have concerned that Marp Core's additional feature (especially auto-scaling) makes theme creation difficult for theme author compared to Marpit.

Typically our presentation app will release with Marp Core, so we have to focus the theming experience within Core. Marpit allows to create theme based on ours, but a fully customized theme requires knowledge of Marp Core. The typical example is --preserve-aspect-ratio variable for alignment in auto-scaling.

We aim to be able to create theme CSS by everyone who familiar with general CSS and HTML markup. So these definitions might prevent our way.

Proposal

By using theme meta, a theme author will make be toggleable our additional feature of Marp Core. Meta flags should support in additional features that have to consider the complex CSS style.

/**
  * Marp core theme
  *
  * @theme theme-name
  * @auto-scaling true
  */ 

If the author has not defined meta, the additional feature does not work in a specified theme.

Currently, we can already recognize @fittingCode (for UNCOVER theme), and this proposal is a generalization of it. The other example of an additional feature that has to consider styling is the footnote. (See: yhatt/marp#2)

@yhatt
Copy link
Member Author

yhatt commented Apr 8, 2019

v0.8.0 was shipped out with this change.

Migration

Theme author requires just to add /* @auto-scaling true */ to theme CSS. And don't need to change anything if you are using Marp Core's official theme through @import rule.

@yhatt yhatt closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant