diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-06-01 16:00:54 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-06-01 16:00:54 +0200 |
commit | 942304d8628bcb226a93ac4d931c3db6e2df07bc (patch) | |
tree | ed5198f8a27537651e9baf150443010380b92fb3 | |
parent | bd19860b4d6e85ff98067546faa4ffd87527a0ba (diff) | |
download | fosdem-2021-minimalism-presentation-942304d8628bcb226a93ac4d931c3db6e2df07bc.tar fosdem-2021-minimalism-presentation-942304d8628bcb226a93ac4d931c3db6e2df07bc.tar.gz |
add --slide-width/height css variables
-rw-r--r-- | js/reveal.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index 4693c00..36ea3dc 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -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(); } |