-
Notifications
You must be signed in to change notification settings - Fork 2
/
playground.html
119 lines (102 loc) · 2.47 KB
/
playground.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Limelight</title>
<script src="/dist/bundle.js" defer></script>
<style>
* {
box-sizing: border-box;
}
body {
padding: 2em;
height: 200vh;
display: flex;
}
.site {
display: flex;
background: #fff;
width: 100%;
}
.box {
width: 100vw;
background-color: whitesmoke;
padding: 1em;
}
h1 {
margin: 0;
clear: both;
}
.container {
max-width: 1200px;
width: 100%;
margin: 0 auto;
display: flex;
}
.content {
width: 80%;
}
.box {
width: 20%;
}
.box__thing {
width: 100px;
height: 100px;
background: rebeccapurple;
}
.content > .box__thing {
position: sticky;
top: 60px;
}
.box.other-thing {
margin-top: 180px;
background: green;
height: 90px;
}
.limelight {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
visibility: hidden;
pointer-events: none;
mix-blend-mode: hard-light;
background-color: rgba(0, 0, 0, 0.8);
will-change: transform;
}
.limelight--is-active {
opacity: 1;
visibility: visible;
}
.limelight__window {
background-color: grey;
position: absolute;
}
/* .limelight rect {
transition: all 3s;
} */
</style>
</head>
<body>
<div class="site">
<div class="container">
<button class="js-start">Start</button>
<div class="content">
Main content
<div class="box__thing">
</div>
</div>
<div class="box">
This is a test
<div class="box__thing">
</div>
</div>
<div class="box other-thing" id="hmmbox"></div>
</div>
</div>
</body>
</html>