summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--css/reveal.css7
-rw-r--r--css/reveal.scss5
-rw-r--r--js/reveal.js31
3 files changed, 28 insertions, 15 deletions
diff --git a/css/reveal.css b/css/reveal.css
index 705d966..f8505c4 100644
--- a/css/reveal.css
+++ b/css/reveal.css
@@ -85,7 +85,8 @@ body {
visibility: visible; }
.reveal .slides section .fragment.strike {
- opacity: 1; }
+ opacity: 1;
+ visibility: visible; }
.reveal .slides section .fragment.strike.visible {
text-decoration: line-through; }
@@ -450,7 +451,7 @@ body {
/*********************************************
* ZOOM TRANSITION
*********************************************/
-.reveal .slides > section[data-transition=zoom], .reveal.zoom .slides > section:not([data-transition]) {
+.reveal .slides section[data-transition=zoom], .reveal.zoom .slides section:not([data-transition]) {
-webkit-transition-timing-function: ease;
transition-timing-function: ease; }
@@ -647,7 +648,7 @@ body {
/*********************************************
* NO TRANSITION
*********************************************/
-.reveal .slides > section[data-transition=none], .reveal.none .slides > section:not([data-transition]) {
+.reveal .slides section[data-transition=none], .reveal.none .slides section:not([data-transition]) {
-webkit-transform: none;
-ms-transform: none;
transform: none;
diff --git a/css/reveal.scss b/css/reveal.scss
index 1be6151..32187fd 100644
--- a/css/reveal.scss
+++ b/css/reveal.scss
@@ -121,6 +121,7 @@ body {
.reveal .slides section .fragment.strike {
opacity: 1;
+ visibility: visible;
&.visible {
text-decoration: line-through;
@@ -434,8 +435,8 @@ body {
*********************************************/
@mixin transition-global($style) {
- .reveal .slides>section[data-transition=#{$style}],
- .reveal.#{$style} .slides>section:not([data-transition]) {
+ .reveal .slides section[data-transition=#{$style}],
+ .reveal.#{$style} .slides section:not([data-transition]) {
@content;
}
}
diff --git a/js/reveal.js b/js/reveal.js
index 2b8476f..913aa28 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1530,13 +1530,20 @@
transformSlides( { layout: '' } );
}
else {
- // Prefer zooming in desktop Chrome so that content remains crisp
- if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) {
+ // Use zoom to scale up in desktop Chrome so that content
+ // remains crisp. We don't use zoom to scale down since that
+ // can lead to shifts in text layout/line breaks.
+ if( scale > 1 && !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) {
dom.slides.style.zoom = scale;
+ dom.slides.style.left = '';
+ dom.slides.style.top = '';
+ dom.slides.style.bottom = '';
+ dom.slides.style.right = '';
transformSlides( { layout: '' } );
}
// Apply scale transform as a fallback
else {
+ dom.slides.style.zoom = '';
dom.slides.style.left = '50%';
dom.slides.style.top = '50%';
dom.slides.style.bottom = 'auto';
@@ -3151,7 +3158,6 @@
// Attempt to create a named link based on the slide's ID
var id = currentSlide.getAttribute( 'id' );
if( id ) {
- id = id.toLowerCase();
id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' );
}
@@ -3764,13 +3770,18 @@
// keyboard modifier key is present
if( activeElementIsCE || activeElementIsInput || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return;
- // While paused only allow resume keyboard events;
- // 'b', '.' or any key specifically mapped to togglePause
- var resumeKeyCodes = [66,190,191].concat( Object.keys( config.keyboard ).map( function( key ) {
- if( config.keyboard[key] === 'togglePause' ) {
- return parseInt( key, 10 );
+ // While paused only allow resume keyboard events; 'b', '.''
+ var resumeKeyCodes = [66,190,191];
+ var key;
+
+ // Custom key bindings for togglePause should be able to resume
+ if( typeof config.keyboard === 'object' ) {
+ for( key in config.keyboard ) {
+ if( config.keyboard[key] === 'togglePause' ) {
+ resumeKeyCodes.push( parseInt( key, 10 ) );
+ }
}
- }));
+ }
if( isPaused() && resumeKeyCodes.indexOf( event.keyCode ) === -1 ) {
return false;
@@ -3781,7 +3792,7 @@
// 1. User defined key bindings
if( typeof config.keyboard === 'object' ) {
- for( var key in config.keyboard ) {
+ for( key in config.keyboard ) {
// Check if this binding matches the pressed key
if( parseInt( key, 10 ) === event.keyCode ) {