12.flb {3 --flb-h: 54px;4 width: 224px;5 height: var(--flb-h);6 padding: 0;7 border: 0;8 border-radius: 6px;9 background: transparent;10 cursor: pointer;11 perspective: 700px;12 font: 600 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;13}14.flb:focus-visible {15 outline: 2px solid #1f4d3a;16 outline-offset: 4px;17}18.flb__prism {19 position: relative;20 display: block;21 width: 100%;22 height: 100%;23 transform-style: preserve-3d;24 transform: translateZ(calc(var(--flb-h) / -2));25 transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);26}27.flb:hover .flb__prism, .flb:focus-visible .flb__prism {28 transform: translateZ(calc(var(--flb-h) / -2)) rotateX(90deg);29}30.flb:active .flb__prism {31 transform: translateZ(calc(var(--flb-h) / -2 - 8px)) rotateX(90deg);32 transition-duration: 160ms;33}34.flb__face {35 position: absolute;36 inset: 0;37 display: flex;38 align-items: center;39 justify-content: center;40 gap: 10px;41 box-sizing: border-box;42 border-radius: 6px;43 backface-visibility: hidden;44}45.flb__face--front {46 background: #1f4d3a;47 color: #ece6d9;48 box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 10px 18px -12px rgba(15, 45, 32, 0.8);49 transform: translateZ(calc(var(--flb-h) / 2));50}51.flb__face--front svg {52 width: 16px;53 height: 16px;54 fill: none;55 stroke: currentColor;56 stroke-width: 2.2;57 stroke-linecap: round;58 stroke-linejoin: round;59}60.flb__face--under {61 border: 2px solid #1f4d3a;62 background: #ece6d9;63 color: #1f4d3a;64 font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;65 letter-spacing: 0.02em;66 transform: rotateX(-90deg) translateZ(calc(var(--flb-h) / 2));67}68@media (prefers-reduced-motion: reduce) {69 .flb__prism {70 transition-duration: 1ms;71 }72}
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
.flb {
--flb-h: 54px;
width: 224px;
height: var(--flb-h);
padding: 0;
border: 0;
border-radius: 6px;
background: transparent;
cursor: pointer;
perspective: 700px;
font: 600 15px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.flb:focus-visible {
outline: 2px solid #1f4d3a;
outline-offset: 4px;
}
.flb__prism {
position: relative;
display: block;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transform: translateZ(calc(var(--flb-h) / -2));
transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.flb:hover .flb__prism, .flb:focus-visible .flb__prism {
transform: translateZ(calc(var(--flb-h) / -2)) rotateX(90deg);
}
.flb:active .flb__prism {
transform: translateZ(calc(var(--flb-h) / -2 - 8px)) rotateX(90deg);
transition-duration: 160ms;
}
.flb__face {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
box-sizing: border-box;
border-radius: 6px;
backface-visibility: hidden;
}
.flb__face--front {
background: #1f4d3a;
color: #ece6d9;
box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 10px 18px -12px rgba(15, 45, 32, 0.8);
transform: translateZ(calc(var(--flb-h) / 2));
}
.flb__face--front svg {
width: 16px;
height: 16px;
fill: none;
stroke: currentColor;
stroke-width: 2.2;
stroke-linecap: round;
stroke-linejoin: round;
}
.flb__face--under {
border: 2px solid #1f4d3a;
background: #ece6d9;
color: #1f4d3a;
font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
letter-spacing: 0.02em;
transform: rotateX(-90deg) translateZ(calc(var(--flb-h) / 2));
}
@media (prefers-reduced-motion: reduce) {
.flb__prism {
transition-duration: 1ms;
}
}
You need to sign in before you can write a comment.