A lightweight arrow is needed for a link or button, without loading an image file or an icon font just for one small shape.
⚡ Quick Fix (TL;DR)
The Culprit: Loading an icon font or an image for a single small arrow adds an extra network request and file weight for something CSS can draw directly.
The Fix: Build the arrow from two rotated borders. It automatically inherits the surrounding text color via currentColor, so it stays in sync with whatever element it sits inside.
.arrow-right {
display: inline-block;
width: 8px;
height: 8px;
border-top: 2px solid currentColor;
border-right: 2px solid currentColor;
transform: rotate(45deg);
margin-left: 6px;
} Was this helpful? Thanks for the feedback!
Tagged in :
More from the field
Bisect to an Empty Baseline Before Trusting Any Single Theory
.
Multiple plausible-sounding theories for a bug each turned out to be wrong when actually tested – time was spent building fixes…
A Security Dashboard’s Activity Log Can Lag a Full Day Behind Real Time
.
Trying to check a security tool’s activity log for an event that had just happened showed nothing at all.