Cube face flip
Cube face flip: a CSS button. Copy the rules, or the prompt that rebuilds it.
CSS
.btn-117 {
position: relative;
font: 600 14px/1 system-ui,sans-serif;
color: #fff;
background: #2563eb;
border: 0;
border-radius: 10px;
width: 150px;
height: 44px;
cursor: pointer;
perspective: 300px;
transition: background .2s
}
.btn-117 span,.btn-117 i {
position: absolute;
inset: 0;
display: grid;
place-items: center;
font-style: normal;
backface-visibility: hidden;
transition: transform .45s
}
.btn-117 i {
transform: rotateX(-90deg) translateZ(22px);
color: #dbeafe;
font-weight: 500
}
.btn-117 span {
transform: rotateX(0) translateZ(22px)
}
.btn-117:hover span {
transform: rotateX(90deg) translateZ(22px)
}
.btn-117:hover i {
transform: rotateX(0) translateZ(22px)
}
.btn-117:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 3px
}
.btn-117:active {
background: #1d4ed8
}
HTML
<button class="btn-117"><span>Download</span><i aria-hidden="true">4.2 MB</i></button>Prompt
A blue #2563eb button (10px radius, 150px by 44px) whose label "Download" rotates away around the X axis like a cube face on hover while a second face "4.2 MB" in pale blue #dbeafe rotates in from below, 450ms, using perspective and backface-visibility hidden. Active #1d4ed8. Focus 2px blue outline offset 3px.