Skip to content

Commit

Permalink
add --slide-width/height css variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Jun 1, 2020
1 parent bd19860 commit 942304d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ export default function( revealElement, options ) {
dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
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 ) {
shuffle();
}
Expand Down

0 comments on commit 942304d

Please sign in to comment.