From e45a425575502ee085012e53ab46d479bd02e541 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 28 Jun 2016 12:12:01 +0200 Subject: [PATCH] default to bottom right controls, rename soften arrows option --- css/reveal.css | 12 +++++++----- css/reveal.scss | 16 ++++++++++------ js/reveal.js | 6 +++--- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/css/reveal.css b/css/reveal.css index 5eeaba7c..6f35fa67 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -206,12 +206,13 @@ body { border: 0; outline: 0; cursor: pointer; - opacity: 0; -webkit-transform: scale(0.9999); transform: scale(0.9999); -webkit-transition: all 0.2s ease; transition: all 0.2s ease; z-index: 2; + visibility: hidden; + opacity: 0; -webkit-appearance: none; -webkit-tap-highlight-color: transparent; } .reveal .controls button:before, @@ -266,13 +267,14 @@ body { left: 50%; -webkit-transform: translateX(-50%) rotate(-90deg); transform: translateX(-50%) rotate(-90deg); } - .reveal .controls.soften-back-arrows .navigate-left.enabled, - .reveal .controls.soften-back-arrows .navigate-up.enabled { + .reveal .controls.deemphasize-back-arrows .navigate-left.enabled, + .reveal .controls.deemphasize-back-arrows .navigate-up.enabled { opacity: 0.3; } - .reveal .controls.soften-back-arrows .navigate-left.enabled:hover, - .reveal .controls.soften-back-arrows .navigate-up.enabled:hover { + .reveal .controls.deemphasize-back-arrows .navigate-left.enabled:hover, + .reveal .controls.deemphasize-back-arrows .navigate-up.enabled:hover { opacity: 1; } .reveal .controls .enabled { + visibility: visible; opacity: 0.7; cursor: pointer; } .reveal .controls .enabled.fragmented { diff --git a/css/reveal.scss b/css/reveal.scss index f3a48887..ead768bc 100644 --- a/css/reveal.scss +++ b/css/reveal.scss @@ -271,10 +271,13 @@ body { border: 0; outline: 0; cursor: pointer; - opacity: 0; transform: scale(.9999); transition: all 0.2s ease; z-index: 2; // above slides + + visibility: hidden; + opacity: 0; + -webkit-appearance: none; -webkit-tap-highlight-color: rgba( 0, 0, 0, 0 ); } @@ -330,11 +333,11 @@ body { transform: translateX(-50%) rotate( -90deg ); } - // The soften back arrows option strongly deemphasizes - // backwards navigation in favor of drawing attention - // forwards - &.soften-back-arrows .navigate-left.enabled, - &.soften-back-arrows .navigate-up.enabled { + // The deemphasize back arrows option strongly deemphasizes + // backwards navigation in favor of drawing attention to + // forwards navigation + &.deemphasize-back-arrows .navigate-left.enabled, + &.deemphasize-back-arrows .navigate-up.enabled { opacity: 0.3; &:hover { @@ -344,6 +347,7 @@ body { // Any control button that can be clicked is "enabled" .enabled { + visibility: visible; opacity: 0.7; cursor: pointer; } diff --git a/js/reveal.js b/js/reveal.js index b584ac37..c38f6950 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -53,10 +53,10 @@ controls: true, // Determines where controls appear, "edges" or "bottom-right" - controlsPlacement: 'edges', + controlsPlacement: 'bottom-right', // De-emphasizes backwards navigation controls - controlsSoftenBackArrows: true, + controlsDeemphasizeBackArrows: true, // Display a presentation progress bar progress: true, @@ -1005,7 +1005,7 @@ dom.progress.style.display = config.progress ? 'block' : 'none'; dom.controls.setAttribute( 'data-controls-placement', config.controlsPlacement ); - dom.controls.classList.toggle( 'soften-back-arrows', config.controlsSoftenBackArrows ); + dom.controls.classList.toggle( 'deemphasize-back-arrows', config.controlsDeemphasizeBackArrows ); if( config.shuffle ) { shuffle();