-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
179 lines (175 loc) · 5.15 KB
/
style.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
body {
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
background-color: #111;
background-image: linear-gradient(45deg, rgba(34, 34, 34, 0.667), rgba(34, 34, 34, 0.334)), url(./grit-fs8.png);
color: #999;
font-family: system-ui, sans-serif;
}
em {
margin-top: 1rem;
}
.keyboard {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-size: 0;
border-radius: 4px;
border: 13px solid #777;
border-top-color: #666;
border-bottom-color: #888;
outline: 3px solid rgba(0, 0, 0, 0.2);
outline-offset: -1px;
box-shadow: inset 0 1rem 1rem rgba(0, 0, 0, 0.5), 0 2rem 3rem -0.5rem rgba(0, 0, 0, 0.55);
background-image: radial-gradient(#111, #222);
padding: 0.25rem;
}
.row {
height: 40px;
display: flex;
justify-content: space-between;
width: 617.2px;
padding-top: 1px;
margin-bottom: 2px;
}
kbd {
border-radius: 3px;
box-sizing: border-box;
color: rgba(0, 0, 0, 0.75);
display: inline-block;
font-family: system-ui, sans-serif;
font-size: 1rem;
font-weight: 400;
line-height: 1.125;
padding: 0.33em 0.66em;
position: relative;
text-align: center;
vertical-align: middle;
width: 40px;
height: 40px;
border: 3px solid transparent;
border-top: 2px solid transparent;
border-bottom: 6px solid transparent;
background-color: #e9e8e6;
border-color: #c3c0bb;
border-top-color: #eeedeb;
border-bottom-color: #a6a29a;
box-shadow: 0 -0.125em 0 -0.063em #a6a29a, 0 0.125em 0 -0.063em rgba(0, 0, 0, 0.5);
transition: -webkit-transform 100ms;
transition: transform 100ms;
transition: transform 100ms, -webkit-transform 100ms;
outline: 0;
}
kbd::before {
content: '';
position: absolute;
top: 0px;
left: -1px;
bottom: -1px;
right: -1px;
border-radius: 4px;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
}
kbd::before {
border-left-color: #b2afa8;
border-right-color: #b2afa8;
border-bottom-color: #959187;
box-shadow: 0 4px 4px -3px rgba(0, 0, 0, 0.15);
background-image: linear-gradient(to right, #e9e8e6, #c9c9c9 5%, transparent 40%, transparent 60%, #c9c9c9 95%, #e9e8e6);
}
kbd:active, kbd.pressed {
-webkit-transform: scale(0.96, 0.96) translate(0, 3px);
transform: scale(0.96, 0.96) translate(0, 3px);
}
kbd[data-key]::after {
position: relative;
z-index: 1;
content: attr(data-key);
text-transform: capitalize;
}
kbd[data-alt]::after {
white-space: pre;
content: attr(data-alt) "\a" attr(data-key);
line-height: 0.95rem;
font-size: 0.7em;
position: absolute;
top: 0;
left: 0;
right: 0;
text-align: center;
}
kbd[data-key=tab], kbd[data-key=enter], kbd[data-key=caps], kbd[data-key=backspace], kbd[data-key=lshift], kbd[data-key=rshift], kbd[data-key=lctrl], kbd[data-key=rctrl], kbd[data-key=lalt], kbd[data-key=ralt], kbd[data-key=lwin], kbd[data-key=rwin], kbd[data-key=rctx] {
background-color: #7f8384;
border-color: #575a5a;
border-top-color: #848889;
border-bottom-color: #393b3b;
box-shadow: 0 -0.125em 0 -0.063em #393b3b, 0 0.125em 0 -0.063em rgba(0, 0, 0, 0.5);
}
kbd[data-key=tab]:after, kbd[data-key=enter]:after, kbd[data-key=caps]:after, kbd[data-key=backspace]:after, kbd[data-key=lshift]:after, kbd[data-key=rshift]:after, kbd[data-key=lctrl]:after, kbd[data-key=rctrl]:after, kbd[data-key=lalt]:after, kbd[data-key=ralt]:after, kbd[data-key=lwin]:after, kbd[data-key=rwin]:after, kbd[data-key=rctx]:after {
font-size: 0.725em;
top: 0;
left: 0;
right: 0;
line-height: 31.2px;
position: absolute;
}
kbd[data-key=tab]::before, kbd[data-key=enter]::before, kbd[data-key=caps]::before, kbd[data-key=backspace]::before, kbd[data-key=lshift]::before, kbd[data-key=rshift]::before, kbd[data-key=lctrl]::before, kbd[data-key=rctrl]::before, kbd[data-key=lalt]::before, kbd[data-key=ralt]::before, kbd[data-key=lwin]::before, kbd[data-key=rwin]::before, kbd[data-key=rctx]::before {
border-left-color: #454848;
border-right-color: #454848;
border-bottom-color: #272929;
box-shadow: 0 4px 4px -3px rgba(0, 0, 0, 0.15);
background-image: linear-gradient(to right, #7f8384, #636363 5%, transparent 40%, transparent 60%, #636363 95%, #7f8384);
}
kbd[data-key=lshift]::after, kbd[data-key=rshift]::after {
content: 'Shift';
}
kbd[data-key=lctrl]::after, kbd[data-key=rctrl]::after {
content: 'Ctrl';
}
kbd[data-key=lwin]::after, kbd[data-key=rwin]::after {
content: '\2756';
font-size: 1rem;
}
kbd[data-key=lalt]::after, kbd[data-key=ralt]::after {
content: 'Alt';
}
kbd[data-key=space]::after {
content: none;
}
kbd[data-key=rctx]::after {
content: '\2630';
}
kbd[data-key=lalt]::after, kbd[data-key=ralt]::after {
content: 'Alt';
}
kbd[data-key=tab], kbd[data-key="\\"] {
width: 60px;
}
kbd[data-key=caps] {
width: 70px;
}
kbd[data-key=backspace] {
width: 80px;
}
kbd[data-key=enter] {
width: 90px;
}
kbd[data-key=lshift] {
width: 90px;
}
kbd[data-key=rshift] {
width: 110px;
}
kbd[data-key=lctrl], kbd[data-key=rctrl], kbd[data-key=lalt], kbd[data-key=ralt], kbd[data-key=lwin], kbd[data-key=rwin], kbd[data-key=rctx] {
width: 50px;
}
kbd[data-key=space] {
width: 250px;
}