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

Enable auto-scaling features in theme metadata explicitly #81

Merged
merged 6 commits into from
Apr 8, 2019

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Apr 6, 2019

This PR updates auto-scaling features implementation to be togglable by theme metadata explicitly. It is related to #72.

Breaking

It has a breaking change that auto-scaling features are disabled by default unless the used theme has enabled them by @auto-scaling meta data.

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.

Motivation

There is a big side effect for Marp Core's theme CSS that it have to take care of the manipulated DOM by the scaling feature. For theme author, this behavior is against POLA.

If you want to support additional features whose the side effect of DOM manipulation, you have to show will via metadata such as @auto-scaling true.

Previously used @fittingCode meta has replaced as the option of @auto-scaling. Now, @auto-scaling meta allows true or the string of target elements: headingDivider, math, and code.

@yhatt yhatt changed the title Enable fitting features in theme metadata explicitly Enable auto-scaling features in theme metadata explicitly Apr 8, 2019
@yhatt yhatt merged commit a84119c into master Apr 8, 2019
@yhatt yhatt deleted the toggle-features-by-theme branch April 8, 2019 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant