add --slide-width/height css variables

edit
Hakim El Hattab 2020-06-01 16:00:54 +02:00
parent bd19860b4d
commit 942304d862
1 changed files with 4 additions and 0 deletions

View File

@ -421,6 +421,10 @@ export default function( revealElement, options ) {
dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed ); dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition ); dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
// Expose our configured slide dimensions as custom props
dom.viewport.style.setProperty( '--size-width', config.width + 'px' );
dom.viewport.style.setProperty( '--size-height', config.height + 'px' );
if( config.shuffle ) { if( config.shuffle ) {
shuffle(); shuffle();
} }