Get back size global directive and 4:3 slide #94
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
size
global directive is getting back from the old Marp app! 🎉I've added Marp size plugin and
@size
theme metadata. It would allow using a traditional 4:3 slide in built-in themes in easier way.size
It also improves backward compatibility of Marp syntax. For example, directive comment in the old Marp app like
<!-- $size: 4:3 -->
would work in Marp Next too.Fix #91.
Marp size plugin
An added plugin will update the registered theme instance to use pre-defined size when
size
global directive matches with the name of@size
metadata in used theme. They have overriddensection
style and would revert after rendered byMarp.render()
.@size
theme metadataMarp Core's theme set has
@size [name] [width] [height]
metadata(s) support to define size presets.Following is an example to define A4 document preset in custom theme. (NOTE: Presets for document are not supported in built-in themes because we've focused to presentation.)
An inherited custom theme from built-in theme still can use defined presets in base theme.
If you want to disable a specific size preset, you can use
@size [name] false
.ToDo
README.md
(size
global directive)themes/README.md
(@size
metadata)