An invitation card where the inked type presses down into thick cotton paper and lifts again, the bite deepening with each pass. The deboss is a light lip below and a shadowed lip above each letter.
Also known as: css embossed text, debossed text css, letterpress effect css, inset text shadow.
<div class="txt-letterpress-deboss-text"> <span class="txt-letterpress-deboss-text-word">Save the Date</span> <span class="txt-letterpress-deboss-text-sub">June 14, 2027</span> </div>
.txt-letterpress-deboss-text {
--c: var(--txt-color, #3b82f6);
font-size: var(--txt-size, 32px);
font-family: system-ui, sans-serif;
font-weight: 700;
line-height: 1.2;
--ink: color-mix(in srgb, var(--c) 55%, #172033);
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 0.3em;
padding: 0.75em 1.5em 0.7em;
border-radius: 0.25em;
background: linear-gradient(170deg, #f8f5ee, #efeadf);
box-shadow: 0 0 0 1px rgb(80 60 20 / 0.1), 0 0.35em 0.9em -0.35em rgb(40 30 10 / 0.35);
font-family: "Didot", "Bodoni 72", "Playfair Display", Georgia, "Times New Roman", serif;
font-weight: 500;}
.txt-letterpress-deboss-text-word, .txt-letterpress-deboss-text-sub {
color: var(--ink);
text-shadow: 0 0 0 rgb(255 255 255 / 0), 0 0 0 rgb(60 40 10 / 0);
animation: txt-letterpress-deboss-text-press 3.6s cubic-bezier(0.6, 0, 0.2, 1) infinite;
}
.txt-letterpress-deboss-text-word {
font-size: 1.2em;
font-style: italic;
}
.txt-letterpress-deboss-text-sub {
font-family: system-ui, sans-serif;
font-size: 0.4em;
font-weight: 600;
letter-spacing: 0.3em;
text-transform: uppercase;
margin-right: -0.3em;
}
@keyframes txt-letterpress-deboss-text-press {
0%, 100% { text-shadow: 0 0 0 rgb(255 255 255 / 0), 0 0 0 rgb(60 40 10 / 0); }
22%, 70% { text-shadow: 0 0.03em 0.01em rgb(255 255 255 / 0.95), 0 -0.02em 0.015em rgb(60 40 10 / 0.35); }
}
@media (prefers-reduced-motion: reduce) {
.txt-letterpress-deboss-text-word, .txt-letterpress-deboss-text-sub { animation: none; text-shadow: 0 0.03em 0.01em rgb(255 255 255 / 0.95), 0 -0.02em 0.015em rgb(60 40 10 / 0.35); }
}
@media (prefers-reduced-motion: reduce) {
.txt-letterpress-deboss-text, .txt-letterpress-deboss-text *, .txt-letterpress-deboss-text::before, .txt-letterpress-deboss-text::after, .txt-letterpress-deboss-text *::before, .txt-letterpress-deboss-text *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}--txt-color on the element or a parent.
Currently previewing #3b82f6.--txt-size. Every other dimension is in
em, so the whole thing scales together. Currently previewing 40px.transition or animation
shorthand. Staggered delays are relative, so they keep their rhythm.