PRACTICAL WEB TIP
Outline to Ink
Large outlined letters fill with color while a background accent line lengthens.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
HTML
<a class="tbx-1099" href="#story"><small>STUDIO JOURNAL / 05</small><span class="tbx-1099__word">CREATE</span><span class="tbx-1099__rule" aria-hidden="true"></span><span class="tbx-1099__footer">Explore new ideas <b aria-hidden="true">↗</b></span></a>
CSS
.tbx-1099{display:flex;flex-direction:column;justify-content:center;width:min(288px,100%);min-height:155px;padding:15px;background:#f2eadd;color:#7b513f;text-decoration:none;font-family:system-ui,sans-serif;overflow:hidden}
.tbx-1099 small{font-size:9px;font-weight:750;letter-spacing:.1em;color:#987d6d}
.tbx-1099__word{font-size:clamp(34px,11vw,48px);font-weight:900;letter-spacing:-.075em;line-height:1.25;color:transparent;-webkit-text-stroke:1.5px #9c6351;paint-order:stroke fill;transition:color .48s,transform .48s cubic-bezier(.2,.8,.2,1)}
.tbx-1099__rule{width:100%;height:2px;background:#c5a58f;position:relative;overflow:hidden}.tbx-1099__rule:before{content:"";position:absolute;inset:0;background:#bf664f;transform:scaleX(0);transform-origin:left;transition:transform .45s}
.tbx-1099__footer{display:flex;justify-content:space-between;margin-top:11px;font-size:10px;font-weight:650}.tbx-1099__footer b{font-size:17px;font-weight:400;transition:transform .35s}
.tbx-1099:is(:hover,:focus-visible) .tbx-1099__word{color:#9c6351;transform:translateX(5px)}.tbx-1099:is(:hover,:focus-visible) .tbx-1099__rule:before{transform:scaleX(1)}.tbx-1099:is(:hover,:focus-visible) .tbx-1099__footer b{transform:translate(2px,-2px)}
.tbx-1099:focus-visible{outline:3px solid #b66e51;outline-offset:3px}@media(prefers-reduced-motion:reduce){.tbx-1099 *,.tbx-1099__rule:before{transition:none!important}}
How to Use
Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.
Use Case
Useful for headings sections and portfolio galleries.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile:Ensure the interactive content remains accessible without hover on touch devices.
Browser:Uses modern CSS. Check behavior in the browsers you support.
Reduced Motion:Check that prefers-reduced-motion is respected.