prevent mobile safari header from covering presentation content
This commit is contained in:
		| @@ -474,6 +474,10 @@ body { | |||||||
|   -ms-touch-action: none; |   -ms-touch-action: none; | ||||||
|       touch-action: none; } |       touch-action: none; } | ||||||
|  |  | ||||||
|  | @media only screen and (orientation: landscape) { | ||||||
|  |   .reveal.ua-iphone { | ||||||
|  |     position: fixed; } } | ||||||
|  |  | ||||||
| .reveal .slides { | .reveal .slides { | ||||||
|   position: absolute; |   position: absolute; | ||||||
|   width: 100%; |   width: 100%; | ||||||
|   | |||||||
| @@ -569,6 +569,16 @@ $controlsArrowAngleActive: 36deg; | |||||||
| 	touch-action: none; | 	touch-action: none; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // Mobile Safari sometimes overlays a header at the top | ||||||
|  | // of the page when in landscape mode. Using fixed | ||||||
|  | // positioning ensures that reveal.js reduces its height | ||||||
|  | // when this header is visible. | ||||||
|  | @media only screen and (orientation : landscape) { | ||||||
|  | 	.reveal.ua-iphone { | ||||||
|  | 		position: fixed; | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  |  | ||||||
| .reveal .slides { | .reveal .slides { | ||||||
| 	position: absolute; | 	position: absolute; | ||||||
| 	width: 100%; | 	width: 100%; | ||||||
|   | |||||||
| @@ -530,6 +530,13 @@ | |||||||
| 			dom.wrapper.classList.remove( 'no-hover' ); | 			dom.wrapper.classList.remove( 'no-hover' ); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | 		if( /iphone/gi.test( UA ) ) { | ||||||
|  | 			dom.wrapper.classList.add( 'ua-iphone' ); | ||||||
|  | 		} | ||||||
|  | 		else { | ||||||
|  | 			dom.wrapper.classList.remove( 'ua-iphone' ); | ||||||
|  | 		} | ||||||
|  |  | ||||||
| 		// Background element | 		// Background element | ||||||
| 		dom.background = createSingletonNode( dom.wrapper, 'div', 'backgrounds', null ); | 		dom.background = createSingletonNode( dom.wrapper, 'div', 'backgrounds', null ); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user