-
Notifications
You must be signed in to change notification settings - Fork 1
/
textRevealer.css
115 lines (99 loc) · 2.53 KB
/
textRevealer.css
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
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
body {
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
overflow: hidden;
}
#textContainer {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
overflow: hidden;
}
.v-rl {
writing-mode: vertical-rl;
}
#textRevealer {
padding: 5vmin 5vmin;
font-size: 70vmin;
font-family: Roboto, "Noto Sans CJK TC", sans-serif;
text-rendering: optimizeLegibility;
white-space: pre;
}
#textArea {
position: absolute;
opacity: 0;
pointer-events: none;
font-family: Roboto, "Noto Sans CJK TC", sans-serif;
text-align: center;
white-space: nowrap;
}
@keyframes blink {
from { background-color: rgba(0, 0, 0, .8); }
to { background-color: rgba(0, 0, 0, 0); }
}
.tag { display: inline-block; }
.tag[data-content="\\n"] { display: inline; }
#textRevealer::before, #textRevealer::after,
.tag[data-content="\\n"]::before, .tag[data-content="\\n"]::after {
content: "";
padding: 1px;
}
.tag.-CURSOR {
position: relative;
margin: 0 -2px;
}
.tag.-CURSOR::before {
content: '';
padding: 0 2px;
animation: blink 600ms ease-in-out infinite alternate both;
}
.tag.-SELECT {
background-color: rgba(0, 0, 0, .5);
color: rgba(255, 255, 255, .9);
}
.tag.-SYMBOL { opacity: .5; }
.tag.-numsign, .tag.-numsign-start {
font-size: 2em;
font-weight: 900;
}
.tag.-numsign2, .tag.-numsign2-start {
font-size: 1.5em;
font-weight: 700;
}
.tag.-at, .tag.-at-start { color: #2196f3; }
.tag.-caret, .tag.-caret-start {
font-size: 0.6em;
transform: translateY(-0.6em);
}
.tag.-caret.-numsign, .tag.-caret-start.-numsign { font-size: 1.2em; }
.tag.-caret.-numsign2, .tag.-caret-start.-numsign2 { font-size: 0.9em; }
.tag.-ast, .tag.-ast3 { font-style: italic; }
.tag.-ast2, .tag.-ast3 { font-weight: bold; }
.tag.-under { text-decoration: underline; }
.tag.-hyphen { text-decoration: line-through; }
.tag.-tilde { text-decoration: line-through; }
.tag.-dblq, .tag.-dblq-start, .tag.-dblq-end,
.tag.-cjkq, .tag.-cjkq-start, .tag.-cjkq-end,
.tag.-cjkdq, .tag.-cjkdq-start, .tag.-cjkdq-end {
font-family: serif;
}
.tag.-grave, .tag.-grave-start, .tag.-grave-end {
font-family: monospace;
font-size: inherit;
font-style: normal;
font-weight: normal;
text-decoration: none;
transform: none;
background-color: rgba(253, 197, 101, .2);
}
.tag.-grave.-SELECT, .tag.-grave-start.-SELECT, .tag.-grave-end.-SELECT {
background-color: rgba(246, 183, 99, .5);
color: #61574c;
}