12.kcb {3 --kcb-d: 8px;4 --kcb-p: 0px;5 position: relative;6 width: 200px;7 height: 96px;8 padding: 0;9 border: 0;10 border-radius: 14px;11 background: #141414;12 box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.07);13 cursor: pointer;14 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;15 -webkit-tap-highlight-color: transparent;16}17.kcb:hover {18 --kcb-p: 2px;19}20.kcb:active {21 --kcb-p: 7px;22}23.kcb:focus-visible {24 outline: 2px solid #ff6a13;25 outline-offset: 4px;26}27.kcb__cap {28 position: absolute;29 top: 4px;30 left: 6px;31 right: 6px;32 height: calc(100% - 12px - var(--kcb-d));33 display: flex;34 flex-direction: column;35 justify-content: space-between;36 padding: 12px 16px;37 box-sizing: border-box;38 border-radius: 10px;39 background: linear-gradient(180deg, #f4efe5 0%, #e1d9c9 100%);40 color: #2a2722;41 text-align: left;42 transform: translateY(var(--kcb-p));43 box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), inset 0 -2px 3px rgba(80, 70, 50, 0.12), 0 calc(var(--kcb-d) - var(--kcb-p)) 0 #b9ae99, 0 calc(var(--kcb-d) - var(--kcb-p) + 1px) 0 #8f8573, 0 calc(var(--kcb-d) - var(--kcb-p) + 6px) 10px rgba(0, 0, 0, 0.55);44 transition: transform 110ms cubic-bezier(0.3, 0.7, 0.4, 1), box-shadow 110ms cubic-bezier(0.3, 0.7, 0.4, 1);45}46.kcb__cap::before {47 content: "";48 position: absolute;49 inset: 6px 8px 8px;50 border-radius: 8px;51 background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 60%);52 box-shadow: inset 0 1px 2px rgba(60, 50, 30, 0.14);53 pointer-events: none;54}55.kcb__key {56 position: relative;57 font-size: 10px;58 letter-spacing: 0.16em;59 text-transform: uppercase;60 color: #e85a0c;61}62.kcb__row {63 position: relative;64 display: flex;65 align-items: center;66 justify-content: space-between;67}68.kcb__legend {69 font-size: 15px;70 font-weight: 600;71}72.kcb__icon {73 width: 20px;74 height: 20px;75 fill: none;76 stroke: currentColor;77 stroke-width: 2;78 stroke-linecap: round;79 stroke-linejoin: round;80 transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);81}82.kcb:hover .kcb__icon {83 transform: translateX(-3px);84}
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
.kcb {
--kcb-d: 8px;
--kcb-p: 0px;
position: relative;
width: 200px;
height: 96px;
padding: 0;
border: 0;
border-radius: 14px;
background: #141414;
box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.07);
cursor: pointer;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
-webkit-tap-highlight-color: transparent;
}
.kcb:hover {
--kcb-p: 2px;
}
.kcb:active {
--kcb-p: 7px;
}
.kcb:focus-visible {
outline: 2px solid #ff6a13;
outline-offset: 4px;
}
.kcb__cap {
position: absolute;
top: 4px;
left: 6px;
right: 6px;
height: calc(100% - 12px - var(--kcb-d));
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 12px 16px;
box-sizing: border-box;
border-radius: 10px;
background: linear-gradient(180deg, #f4efe5 0%, #e1d9c9 100%);
color: #2a2722;
text-align: left;
transform: translateY(var(--kcb-p));
box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), inset 0 -2px 3px rgba(80, 70, 50, 0.12), 0 calc(var(--kcb-d) - var(--kcb-p)) 0 #b9ae99, 0 calc(var(--kcb-d) - var(--kcb-p) + 1px) 0 #8f8573, 0 calc(var(--kcb-d) - var(--kcb-p) + 6px) 10px rgba(0, 0, 0, 0.55);
transition: transform 110ms cubic-bezier(0.3, 0.7, 0.4, 1), box-shadow 110ms cubic-bezier(0.3, 0.7, 0.4, 1);
}
.kcb__cap::before {
content: "";
position: absolute;
inset: 6px 8px 8px;
border-radius: 8px;
background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 60%);
box-shadow: inset 0 1px 2px rgba(60, 50, 30, 0.14);
pointer-events: none;
}
.kcb__key {
position: relative;
font-size: 10px;
letter-spacing: 0.16em;
text-transform: uppercase;
color: #e85a0c;
}
.kcb__row {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
}
.kcb__legend {
font-size: 15px;
font-weight: 600;
}
.kcb__icon {
width: 20px;
height: 20px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kcb:hover .kcb__icon {
transform: translateX(-3px);
}
You need to sign in before you can write a comment.