Skip to content

Commit d678ec6

Browse files
author
jordanmccullough
committed
Replace CSS slide 100% height with JS
Simplifies CSS hiccups and relies on Javascript for window resizing of slide to full “screen”
1 parent 3778152 commit d678ec6

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

_javascript/curriculum.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
$(function(){
22

3+
$(window).resize(function () {
4+
updateSlideSize();
5+
});
6+
7+
updateSlideSize();
8+
9+
function updateSlideSize(){
10+
var w = window.innerWidth;
11+
var h = window.innerHeight;
12+
$(".slide").css("height", h);
13+
}
14+
315
buildToc();
416

517
$(document).scrollsnap({

_stylesheets/curriculum-beta.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ $mono-dark: #454545;
1515
}
1616
}
1717

18-
html, body{
19-
height: 100%;
18+
body{
2019
background: #f4f4f4;
2120
font-size: 16px;
2221
}
@@ -26,7 +25,6 @@ html, body{
2625
}
2726

2827
.curriculum{
29-
height: 100%;
3028
width: 100%;
3129

3230
h1,h2,h3,h4,h5,h6,p,ul,svg{
@@ -78,7 +76,6 @@ html, body{
7876

7977

8078
.slide{
81-
min-height: 100%;
8279
width: 100%;
8380
background: #ffffff;
8481
display: table;

0 commit comments

Comments
 (0)