Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
Hakim El Hattab | 38b11a4d8e | |
Hakim El Hattab | 685b833e56 | |
Hakim El Hattab | dfcd60896b | |
Hakim El Hattab | 7f5361fdba | |
Hakim El Hattab | 5bab3c4fa0 | |
Hakim El Hattab | 939af263ce | |
Hakim El Hattab | 90539cff2c | |
Hakim El Hattab | 328754be58 | |
Hakim El Hattab | 3144dbefbd | |
Hakim El Hattab | 54195e3c6b | |
Hakim El Hattab | 99396735a0 |
|
@ -370,7 +370,7 @@ body {
|
|||
}
|
||||
|
||||
.reveal table {
|
||||
margin: auto;
|
||||
margin: 0 auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ body {
|
|||
display: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding: 20px 0px;
|
||||
padding: 0px;
|
||||
|
||||
z-index: 10;
|
||||
line-height: 1.2em;
|
||||
|
@ -619,6 +619,49 @@ body {
|
|||
opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||
}
|
||||
|
||||
.reveal .slides>section.visible,
|
||||
.reveal .slides>section>section.visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.reveal.center .slides {
|
||||
top: -40px;
|
||||
}
|
||||
|
||||
.reveal.center .slides,
|
||||
.reveal.center .slides section {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.reveal.center .slides section:not(.stack) {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -moz-box;
|
||||
display: -moz-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
-webkit-flex-direction: column;
|
||||
-moz-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
-moz-align-items: center;
|
||||
align-items: center;
|
||||
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-moz-justify-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Global transition speed settings */
|
||||
.reveal[data-transition-speed="fast"] .slides section {
|
||||
-webkit-transition-duration: 400ms;
|
||||
|
@ -643,24 +686,12 @@ body {
|
|||
transition-duration: 1200ms;
|
||||
}
|
||||
|
||||
.reveal .slides>section.stack {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.reveal .slides>section.present,
|
||||
.reveal .slides>section>section.present {
|
||||
display: block;
|
||||
z-index: 11;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.reveal.center,
|
||||
.reveal.center .slides,
|
||||
.reveal.center .slides section {
|
||||
min-height: auto !important;
|
||||
}
|
||||
|
||||
/* Don't allow interaction with invisible slides */
|
||||
.reveal .slides>section.future,
|
||||
.reveal .slides>section>section.future,
|
||||
|
@ -1162,7 +1193,6 @@ body {
|
|||
}
|
||||
|
||||
.reveal.overview .slides section {
|
||||
height: 600px;
|
||||
overflow: hidden;
|
||||
opacity: 1 !important;
|
||||
visibility: visible !important;
|
||||
|
|
36
js/reveal.js
36
js/reveal.js
|
@ -1178,25 +1178,29 @@ var Reveal = (function(){
|
|||
|
||||
for( var i = 0, len = slides.length; i < len; i++ ) {
|
||||
var slide = slides[ i ];
|
||||
var style = window.getComputedStyle( slide );
|
||||
|
||||
// Don't bother updating invisible slides
|
||||
if( slide.style.display === 'none' ) {
|
||||
// Don't update invisible slides
|
||||
if( style.display === 'none' ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if( config.center || slide.classList.contains( 'center' ) ) {
|
||||
// Vertical stacks are not centred since their section
|
||||
// children will be
|
||||
if( slide.classList.contains( 'stack' ) ) {
|
||||
slide.style.top = 0;
|
||||
// If the display mode is 'block' flexbox is not supported by
|
||||
// the current browser so we fall back on JavaScript centering
|
||||
else if( style.display === 'block' ) {
|
||||
if( config.center || slide.classList.contains( 'center' ) ) {
|
||||
// Vertical stacks are not centred since their section children will be
|
||||
if( slide.classList.contains( 'stack' ) ) {
|
||||
slide.style.top = 0;
|
||||
}
|
||||
else {
|
||||
slide.style.top = Math.max( ( ( slideHeight - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px';
|
||||
slide.style.height = 'auto';
|
||||
}
|
||||
}
|
||||
else {
|
||||
slide.style.top = Math.max( ( ( slideHeight - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px';
|
||||
slide.style.top = '';
|
||||
}
|
||||
}
|
||||
else {
|
||||
slide.style.top = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1926,11 +1930,11 @@ var Reveal = (function(){
|
|||
|
||||
// Show the horizontal slide if it's within the view distance
|
||||
if( distanceX < viewDistance ) {
|
||||
horizontalSlide.style.display = 'block';
|
||||
horizontalSlide.classList.add( 'visible' );
|
||||
loadSlide( horizontalSlide );
|
||||
}
|
||||
else {
|
||||
horizontalSlide.style.display = 'none';
|
||||
horizontalSlide.classList.remove( 'visible' );
|
||||
}
|
||||
|
||||
if( verticalSlidesLength ) {
|
||||
|
@ -1943,11 +1947,11 @@ var Reveal = (function(){
|
|||
distanceY = x === indexh ? Math.abs( indexv - y ) : Math.abs( y - oy );
|
||||
|
||||
if( distanceX + distanceY < viewDistance ) {
|
||||
verticalSlide.style.display = 'block';
|
||||
verticalSlide.classList.add( 'visible' );
|
||||
loadSlide( verticalSlide );
|
||||
}
|
||||
else {
|
||||
verticalSlide.style.display = 'none';
|
||||
verticalSlide.classList.remove( 'visible' );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue