-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglitchtml-style.php
46 lines (40 loc) · 951 Bytes
/
glitchtml-style.php
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
<?php
// Creates stylesheet for glitchtml elements
require_once 'glitchtml-config.php';
$config = new GlitchConfig();
$size = $config->getGlitchSize();
$text = $config->getGlitchText();
$timefactor = $config->getGlitchTime();
$length = strlen($text);
$time = $timefactor * $length * .1;
$start = $length * -100;
header("Content-Type: text/css");
?>
.glitchtml-outer-container {
position: relative;
width: 100%;
height: clamp(8px, 5vw, 30px);
overflow: hidden;
}
.glitchtml-inner-container {
position: absolute;
width: 100%;
animation: scroll-up <?php echo $time; ?>s forwards steps(<?php echo $length; ?>);
}
@keyframes scroll-up {
from {
bottom: <?php echo $start; ?>%;
}
to {
bottom: 0%;
}
}
.glitchtml-inner-container p {
margin: 0;
padding: 0;
line-height: clamp(8px, 5vw, 30px);
font-family: 'Courier New', monospace;
font-size: clamp(8px, 5vw, 30px);
color: var(--tdcream);
white-space: nowrap;
}