Newer
Older
* Copyright (C) Hakim El Hattab, https://hakim.se
/*********************************************
* GLOBAL STYLES
*********************************************/
html.reveal-full-page {
height: calc( var(--vh, 1vh) * 100 );
position: relative;
line-height: 1;
margin: 0;
--r-controls-spacing: 12px;
// Force the presentation to cover the full viewport when we
// enter fullscreen mode. Fixes sizing issues in Safari.
.reveal-viewport:fullscreen {
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
}
/*********************************************
* VIEW FRAGMENTS
*********************************************/
Hakim El Hattab
a validé
.reveal .fragment {
Yves Delley
a validé
transition: all .2s ease;
Hakim El Hattab
a validé
&:not(.custom) {
opacity: 0;
visibility: hidden;
will-change: opacity;
}
Hakim El Hattab
a validé
visibility: inherit;
Hakim El Hattab
a validé
&.disabled {
transition: none;
}
Hakim El Hattab
a validé
.reveal .fragment.grow {
Hakim El Hattab
a validé
visibility: inherit;
Yves Delley
a validé
transform: scale( 1.3 );
Hakim El Hattab
a validé
.reveal .fragment.shrink {
Hakim El Hattab
a validé
visibility: inherit;
Yves Delley
a validé
transform: scale( 0.7 );
Hakim El Hattab
a validé
.reveal .fragment.zoom-in {
Yves Delley
a validé
transform: scale( 0.1 );
Hakim El Hattab
a validé
.reveal .fragment.fade-out {
Hakim El Hattab
a validé
visibility: inherit;
Hakim El Hattab
a validé
.reveal .fragment.semi-fade-out {
Hakim El Hattab
a validé
visibility: inherit;
Hakim El Hattab
a validé
visibility: inherit;
Hakim El Hattab
a validé
.reveal .fragment.strike {
Hakim El Hattab
a validé
visibility: inherit;
&.visible {
text-decoration: line-through;
}
}
Hakim El Hattab
a validé
.reveal .fragment.fade-up {
transform: translate(0, 40px);
&.visible {
transform: translate(0, 0);
}
}
Hakim El Hattab
a validé
.reveal .fragment.fade-down {
transform: translate(0, -40px);
&.visible {
transform: translate(0, 0);
}
}
Hakim El Hattab
a validé
.reveal .fragment.fade-right {
transform: translate(-40px, 0);
&.visible {
transform: translate(0, 0);
}
}
Hakim El Hattab
a validé
.reveal .fragment.fade-left {
transform: translate(40px, 0);
&.visible {
transform: translate(0, 0);
}
}
Hakim El Hattab
a validé
.reveal .fragment.fade-in-then-out,
.reveal .fragment.current-visible {
Hakim El Hattab
a validé
visibility: inherit;
Hakim El Hattab
a validé
.reveal .fragment.fade-in-then-semi-out {
Hakim El Hattab
a validé
opacity: 0;
visibility: hidden;
&.visible {
opacity: 0.5;
visibility: inherit;
}
&.current-fragment {
opacity: 1;
visibility: inherit;
}
}
Hakim El Hattab
a validé
.reveal .fragment.highlight-red,
.reveal .fragment.highlight-current-red,
.reveal .fragment.highlight-green,
.reveal .fragment.highlight-current-green,
.reveal .fragment.highlight-blue,
.reveal .fragment.highlight-current-blue {
Hakim El Hattab
a validé
visibility: inherit;
Hakim El Hattab
a validé
.reveal .fragment.highlight-red.visible {
Hakim El Hattab
a validé
.reveal .fragment.highlight-green.visible {
Hakim El Hattab
a validé
.reveal .fragment.highlight-blue.visible {
Hakim El Hattab
a validé
.reveal .fragment.highlight-current-red.current-fragment {
Hakim El Hattab
a validé
.reveal .fragment.highlight-current-green.current-fragment {
Hakim El Hattab
a validé
.reveal .fragment.highlight-current-blue.current-fragment {
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
color: #1b91ff;
}
/*********************************************
* DEFAULT ELEMENT STYLES
*********************************************/
/* Fixes issue in Chrome where italic fonts did not appear when printing to PDF */
.reveal:after {
content: '';
font-style: italic;
}
.reveal iframe {
z-index: 1;
}
/** Prevents layering issues in certain browser/transition combinations */
.reveal a {
position: relative;
}
/*********************************************
* CONTROLS
*********************************************/
Hakim El Hattab
a validé
@keyframes bounce-right {
0%, 10%, 25%, 40%, 50% {transform: translateX(0);}
20% {transform: translateX(10px);}
30% {transform: translateX(-5px);}
}
@keyframes bounce-left {
0%, 10%, 25%, 40%, 50% {transform: translateX(0);}
20% {transform: translateX(-10px);}
30% {transform: translateX(5px);}
}
Hakim El Hattab
a validé
@keyframes bounce-down {
0%, 10%, 25%, 40%, 50% {transform: translateY(0);}
20% {transform: translateY(10px);}
30% {transform: translateY(-5px);}
}
$controlArrowSize: 3.6em;
$controlArrowSpacing: 1.4em;
$controlArrowLength: 2.6em;
$controlArrowThickness: 0.5em;
$controlsArrowAngle: 45deg;
$controlsArrowAngleHover: 40deg;
$controlsArrowAngleActive: 36deg;
@mixin controlsArrowTransform( $angle ) {
&:before {
transform: translateX(($controlArrowSize - $controlArrowLength)*0.5) translateY(($controlArrowSize - $controlArrowThickness)*0.5) rotate( $angle );
transform: translateX(($controlArrowSize - $controlArrowLength)*0.5) translateY(($controlArrowSize - $controlArrowThickness)*0.5) rotate( -$angle );
display: none;
position: absolute;
Hakim El Hattab
a validé
top: auto;
bottom: var(--r-controls-spacing);
right: var(--r-controls-spacing);
Hakim El Hattab
a validé
left: auto;
pointer-events: none;
button {
position: absolute;
padding: 0;
background-color: transparent;
border: 0;
outline: 0;
cursor: pointer;
transition: color 0.2s ease,
opacity 0.2s ease,
transform 0.2s ease;
z-index: 2; // above slides
pointer-events: auto;
visibility: hidden;
opacity: 0;
-webkit-appearance: none;
-webkit-tap-highlight-color: rgba( 0, 0, 0, 0 );
}
.controls-arrow:before,
.controls-arrow:after {
content: '';
position: absolute;
top: 0;
width: $controlArrowLength;
height: $controlArrowThickness;
border-radius: $controlArrowThickness*0.5;
background-color: currentColor;
transition: all 0.15s ease, background-color 0.8s ease;
transform-origin: math.div(floor(($controlArrowThickness*0.5)*10), 10) 50%;
Hakim El Hattab
a validé
position: relative;
width: $controlArrowSize;
height: $controlArrowSize;
Hakim El Hattab
a validé
@include controlsArrowTransform( $controlsArrowAngle );
@include controlsArrowTransform( $controlsArrowAngleHover );
@include controlsArrowTransform( $controlsArrowAngleActive );
}
}
.navigate-left {
right: $controlArrowSize + $controlArrowSpacing*2;
bottom: $controlArrowSpacing + $controlArrowSize*0.5;
&.highlight {
animation: bounce-left 2s 50 both ease-out;
}
}
.navigate-right {
Hakim El Hattab
a validé
right: 0;
bottom: $controlArrowSpacing + $controlArrowSize*0.5;
Hakim El Hattab
a validé
Hakim El Hattab
a validé
}
Hakim El Hattab
a validé
animation: bounce-right 2s 50 both ease-out;
}
right: $controlArrowSpacing + $controlArrowSize*0.5;
bottom: $controlArrowSpacing*2 + $controlArrowSize;
Hakim El Hattab
a validé
transform: rotate( 90deg );
Hakim El Hattab
a validé
}
}
.navigate-down {
right: $controlArrowSpacing + $controlArrowSize*0.5;
bottom: -$controlArrowSpacing;
padding-bottom: $controlArrowSpacing;
Hakim El Hattab
a validé
Hakim El Hattab
a validé
}
Hakim El Hattab
a validé
animation: bounce-down 2s 50 both ease-out;
}
// Deemphasize backwards navigation arrows in favor of drawing
// attention to forwards navigation
&[data-controls-back-arrows="faded"] .navigate-up.enabled {
opacity: 0.3;
&:hover {
opacity: 1;
}
}
// Back arrow style: "hidden":
// Never show arrows for backwards navigation
&[data-controls-back-arrows="hidden"] .navigate-up.enabled {
opacity: 0;
visibility: hidden;
}
// Any control button that can be clicked is "enabled"
.enabled {
visibility: visible;
}
// Any control button that leads to showing or hiding
// a fragment
.enabled.fragmented {
}
.enabled:hover,
.enabled.fragmented:hover {
opacity: 1;
}
Hakim El Hattab
a validé
}
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
.reveal:not(.rtl) .controls {
// Back arrow style: "faded":
// Deemphasize left arrow
&[data-controls-back-arrows="faded"] .navigate-left.enabled {
opacity: 0.3;
&:hover {
opacity: 1;
}
}
// Back arrow style: "hidden":
// Never show left arrow
&[data-controls-back-arrows="hidden"] .navigate-left.enabled {
opacity: 0;
visibility: hidden;
}
}
.reveal.rtl .controls {
// Back arrow style: "faded":
// Deemphasize right arrow in RTL mode
&[data-controls-back-arrows="faded"] .navigate-right.enabled {
opacity: 0.3;
&:hover {
opacity: 1;
}
}
// Back arrow style: "hidden":
// Never show right arrow in RTL mode
&[data-controls-back-arrows="hidden"] .navigate-right.enabled {
opacity: 0;
visibility: hidden;
}
}
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-up,
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-down {
display: none;
}
Hakim El Hattab
a validé
// Adjust the layout when there are no vertical slides
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-left,
.reveal:not(.has-vertical-slides) .controls .navigate-left {
bottom: $controlArrowSpacing;
right: 0.5em + $controlArrowSpacing + $controlArrowSize;
Hakim El Hattab
a validé
}
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-right,
.reveal:not(.has-vertical-slides) .controls .navigate-right {
bottom: $controlArrowSpacing;
// Adjust the layout when there are no horizontal slides
.reveal:not(.has-horizontal-slides) .controls .navigate-up {
right: $controlArrowSpacing;
bottom: $controlArrowSpacing + $controlArrowSize;
}
.reveal:not(.has-horizontal-slides) .controls .navigate-down {
right: $controlArrowSpacing;
// Invert arrows based on background color
.reveal.has-dark-background .controls {
color: #fff;
.reveal.has-light-background .controls {
color: #000;
// Disable active states on touch devices
.reveal.no-hover .controls .controls-arrow:hover,
.reveal.no-hover .controls .controls-arrow:active {
@include controlsArrowTransform( $controlsArrowAngle );
}
// Edge aligned controls layout
@media screen and (min-width: 500px) {
.reveal-viewport {
--r-controls-spacing: 0.8em;
}
.reveal .controls[data-controls-layout="edges"] {
& {
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.navigate-left,
.navigate-right,
.navigate-up,
.navigate-down {
bottom: auto;
right: auto;
}
.navigate-left {
top: 50%;
left: var(--r-controls-spacing);
}
.navigate-right {
top: 50%;
right: var(--r-controls-spacing);
}
.navigate-up {
top: var(--r-controls-spacing);
left: 50%;
}
.navigate-down {
bottom: calc(var(--r-controls-spacing) - #{$controlArrowSpacing} + 0.3em);
left: 50%;
}
}
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
position: absolute;
display: none;
height: 3px;
width: 100%;
bottom: 0;
left: 0;
z-index: 10;
}
.reveal .progress:after {
content: '';
}
.reveal .progress span {
display: block;
height: 100%;
width: 100%;
background-color: currentColor;
transition: transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
transform-origin: 0 0;
transform: scaleX(0);
}
/*********************************************
* SLIDE NUMBER
*********************************************/
.reveal .slide-number {
right: 8px;
bottom: 8px;
color: #fff;
padding: 5px;
.reveal .slide-number a {
color: currentColor;
}
/*********************************************
* SLIDES
*********************************************/
.reveal {
position: relative;
width: 100%;
height: 100%;
// Swiping on an embedded deck should not block page scrolling
.reveal.embedded {
touch-action: pan-y;
}
.reveal .slides {
position: absolute;
width: 100%;
height: 100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
pointer-events: none;
overflow: visible;
z-index: 1;
text-align: center;
perspective: 600px;
perspective-origin: 50% 40%;
}
.reveal .slides>section {
perspective: 600px;
}
.reveal .slides>section,
.reveal .slides>section>section {
display: none;
position: absolute;
width: 100%;
pointer-events: auto;
Hakim El Hattab
a validé
transform-style: flat;
Yves Delley
a validé
transition: transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),
transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),
visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),
opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
}
/* Global transition speed settings */
.reveal[data-transition-speed="fast"] .slides section {
Yves Delley
a validé
transition-duration: 400ms;
}
.reveal[data-transition-speed="slow"] .slides section {
Yves Delley
a validé
transition-duration: 1200ms;
}
/* Slide-specific transition speed overrides */
.reveal .slides section[data-transition-speed="fast"] {
Yves Delley
a validé
transition-duration: 400ms;
}
.reveal .slides section[data-transition-speed="slow"] {
Yves Delley
a validé
transition-duration: 1200ms;
}
.reveal .slides>section.stack {
padding-top: 0;
padding-bottom: 0;
pointer-events: none;
height: 100%;
}
.reveal .slides>section.present,
.reveal .slides>section>section.present {
display: block;
z-index: 11;
opacity: 1;
}
.reveal .slides>section:empty,
.reveal .slides>section>section:empty,
.reveal .slides>section[data-background-interactive],
.reveal .slides>section>section[data-background-interactive] {
pointer-events: none;
}
.reveal.center,
.reveal.center .slides,
.reveal.center .slides section {
min-height: 0 !important;
}
/* Don't allow interaction with invisible slides */
Hakim El Hattab
a validé
.reveal .slides>section:not(.present),
.reveal .slides>section>section:not(.present) {
pointer-events: none;
}
.reveal.overview .slides>section,
.reveal.overview .slides>section>section {
pointer-events: auto;
}
.reveal .slides>section.past,
.reveal .slides>section.future,
hakimel
a validé
.reveal .slides>section.past>section,
.reveal .slides>section.future>section,
.reveal .slides>section>section.past,
.reveal .slides>section>section.future {
opacity: 0;
}
/*********************************************
* Mixins for readability of transitions
@mixin transition-global($style) {
.reveal .slides section[data-transition=#{$style}],
.reveal.#{$style} .slides section:not([data-transition]) {
@content;
}
@mixin transition-stack($style) {
.reveal .slides section[data-transition=#{$style}].stack,
.reveal.#{$style} .slides section.stack {
@content;
}
}
@mixin transition-horizontal-past($style) {
.reveal .slides>section[data-transition=#{$style}].past,
.reveal .slides>section[data-transition~=#{$style}-out].past,
.reveal.#{$style} .slides>section:not([data-transition]).past {
@content;
}
@mixin transition-horizontal-future($style) {
.reveal .slides>section[data-transition=#{$style}].future,
.reveal .slides>section[data-transition~=#{$style}-in].future,
.reveal.#{$style} .slides>section:not([data-transition]).future {
@content;
}
@mixin transition-vertical-past($style) {
.reveal .slides>section>section[data-transition=#{$style}].past,
.reveal .slides>section>section[data-transition~=#{$style}-out].past,
.reveal.#{$style} .slides>section>section:not([data-transition]).past {
@content;
}
@mixin transition-vertical-future($style) {
.reveal .slides>section>section[data-transition=#{$style}].future,
.reveal .slides>section>section[data-transition~=#{$style}-in].future,
.reveal.#{$style} .slides>section>section:not([data-transition]).future {
@content;
}
/*********************************************
* SLIDE TRANSITION
* Aliased 'linear' for backwards compatibility
*********************************************/
@each $stylename in slide, linear {
@include transition-horizontal-past(#{$stylename}) {
transform: translate(-150%, 0);
}
@include transition-horizontal-future(#{$stylename}) {
transform: translate(150%, 0);
}
@include transition-vertical-past(#{$stylename}) {
transform: translate(0, -150%);
}
@include transition-vertical-future(#{$stylename}) {
transform: translate(0, 150%);
}
}
/*********************************************
* CONVEX TRANSITION
* Aliased 'default' for backwards compatibility
*********************************************/
@each $stylename in default, convex {
@include transition-stack(#{$stylename}) {
Hakim El Hattab
a validé
transform-style: preserve-3d;
}
@include transition-horizontal-past(#{$stylename}) {
transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);
}
@include transition-horizontal-future(#{$stylename}) {
transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);
}
@include transition-vertical-past(#{$stylename}) {
transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);
}
@include transition-vertical-future(#{$stylename}) {
transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);
}
}
/*********************************************
* CONCAVE TRANSITION
*********************************************/
@include transition-stack(concave) {
Hakim El Hattab
a validé
transform-style: preserve-3d;
}
@include transition-horizontal-past(concave) {
Yves Delley
a validé
transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);
@include transition-horizontal-future(concave) {
Yves Delley
a validé
transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);
@include transition-vertical-past(concave) {
Yves Delley
a validé
transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0);
@include transition-vertical-future(concave) {
Yves Delley
a validé
transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0);
}
/*********************************************
* ZOOM TRANSITION
*********************************************/
@include transition-global(zoom) {
transition-timing-function: ease;
@include transition-horizontal-past(zoom) {
visibility: hidden;
transform: scale(16);
@include transition-horizontal-future(zoom) {
visibility: hidden;
transform: scale(0.2);
@include transition-vertical-past(zoom) {
transform: scale(16);
@include transition-vertical-future(zoom) {
transform: scale(0.2);
}
/*********************************************
* CUBE TRANSITION
*
* WARNING:
* this is deprecated and will be removed in a
* future version.
*********************************************/
.reveal.cube .slides {
}
.reveal.cube .slides section {
padding: 30px;
min-height: 700px;
backface-visibility: hidden;
Yves Delley
a validé
box-sizing: border-box;
Hakim El Hattab
a validé
transform-style: preserve-3d;
}
.reveal.center.cube .slides section {
min-height: 0;
}
.reveal.cube .slides section:not(.stack):before {
content: '';
position: absolute;
display: block;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,0.1);
border-radius: 4px;
Yves Delley
a validé
transform: translateZ( -20px );
}
.reveal.cube .slides section:not(.stack):after {
content: '';
position: absolute;
display: block;
width: 90%;
height: 30px;
left: 5%;
bottom: 0;
background: none;
z-index: 1;
border-radius: 4px;
box-shadow: 0px 95px 25px rgba(0,0,0,0.2);
Yves Delley
a validé
transform: translateZ(-90px) rotateX( 65deg );
}
.reveal.cube .slides>section.stack {
padding: 0;
background: none;
}
.reveal.cube .slides>section.past {
Yves Delley
a validé
transform-origin: 100% 0%;
transform: translate3d(-100%, 0, 0) rotateY(-90deg);
}
.reveal.cube .slides>section.future {
Yves Delley
a validé
transform-origin: 0% 0%;
transform: translate3d(100%, 0, 0) rotateY(90deg);
}
.reveal.cube .slides>section>section.past {
Yves Delley
a validé
transform-origin: 0% 100%;
transform: translate3d(0, -100%, 0) rotateX(90deg);
}
.reveal.cube .slides>section>section.future {
Yves Delley
a validé
transform-origin: 0% 0%;
transform: translate3d(0, 100%, 0) rotateX(-90deg);
}
/*********************************************
* PAGE TRANSITION
*
* WARNING:
* this is deprecated and will be removed in a
* future version.
*********************************************/
.reveal.page .slides {
perspective-origin: 0% 50%;
perspective: 3000px;
}
.reveal.page .slides section {
padding: 30px;
min-height: 700px;
Yves Delley
a validé
box-sizing: border-box;
Hakim El Hattab
a validé
transform-style: preserve-3d;
}
.reveal.page .slides section.past {
z-index: 12;
}
.reveal.page .slides section:not(.stack):before {
content: '';
position: absolute;
display: block;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0,0,0,0.1);
Yves Delley
a validé
transform: translateZ( -20px );
}
.reveal.page .slides section:not(.stack):after {
content: '';
position: absolute;
display: block;
width: 90%;
height: 30px;
left: 5%;
bottom: 0;
background: none;
z-index: 1;
border-radius: 4px;
box-shadow: 0px 95px 25px rgba(0,0,0,0.2);
Yves Delley
a validé
-webkit-transform: translateZ(-90px) rotateX( 65deg );