renamed .remaining-height to .stretch #244 #490 #561

This commit is contained in:
Hakim El Hattab 2013-08-18 17:56:41 -04:00
parent 04c4fa49b8
commit 0748b68335
4 changed files with 10 additions and 10 deletions

View file

@ -318,7 +318,7 @@ body {
max-height: 400px;
word-wrap: normal;
}
.reveal pre.remaining-height code {
.reveal pre.stretch code {
height: 100%;
max-height: 100%;
@ -355,7 +355,7 @@ body {
vertical-align: top;
}
.reveal .remaining-height {
.reveal .stretch {
max-width: none;
max-height: none;
}

2
css/reveal.min.css vendored

File diff suppressed because one or more lines are too long

View file

@ -1001,6 +1001,9 @@ var Reveal = (function(){
slideHeight = config.height,
slidePadding = 20; // TODO Dig this out of DOM
// Layout the contents of the slides
layoutSlideContents( config.width, config.height, slidePadding );
// Slide width may be a percentage of available width
if( typeof slideWidth === 'string' && /%$/.test( slideWidth ) ) {
slideWidth = parseInt( slideWidth, 10 ) / 100 * availableWidth;
@ -1014,9 +1017,6 @@ var Reveal = (function(){
dom.slides.style.width = slideWidth + 'px';
dom.slides.style.height = slideHeight + 'px';
// Layout the contents of the slides
layoutSlideContents( config.width, config.height, slidePadding );
// Determine scale of content to fit within available space
scale = Math.min( availableWidth / slideWidth, availableHeight / slideHeight );
@ -1073,8 +1073,8 @@ var Reveal = (function(){
*/
function layoutSlideContents( width, height, padding ) {
// Handle sizing of elements with the 'remaining-height' class
toArray( dom.slides.querySelectorAll( 'section > .remaining-height' ) ).forEach( function( element ) {
// Handle sizing of elements with the 'stretch' class
toArray( dom.slides.querySelectorAll( 'section > .stretch' ) ).forEach( function( element ) {
// Determine how much vertical space we can use
var remainingHeight = getRemainingHeight( element, ( height - ( padding * 2 ) ) );

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long