Allow setting default duration in custom transition #459
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.
Allowed setting the default duration time of animation for specific custom transition. Declare
--marp-transition-duration
custom property in the first keyframe (from
or0%
).Memo for cross-browser support...
Inspecting the custom duration is working only in Chrome. It's OK in the experiment phase, but if API had supported other browsers, we have to consider about abusing an existing animatable property that takes a
<custom-ident>
value, such asgrid-area
.For getting the state of
--marp-transition-duration
custom property directly in Firefox and Safari, either ofCSS.registerProperty()
or@property
at-rule is required to mark the property interpolatable and make parsable the specific value within an animation keyframe. There are not supported in neither Firefox nor Safari too.The
bespoke
template does never try to display the container of transition images as a grid container, so an abusedgrid-area
property should not have any harmful effects. I hope no need to do this hack when API was marked as stable, but we may have to consider adding PostCSS plugin to transform the custom property just in case API is coming to Firefox and Safari.