A big problem with letter-spacing and a super easy Sass mixin to fix it

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI7 min

About this video

Shows why letter-spacing shifts center and right aligned text in CSS and how a small Sass mixin can add the spacing correction in one line. Suited to people who already write CSS and want a reusable fix.

What you’ll learn

  • Explain why letter-spacing misaligns centered and right-aligned text
  • Write a Sass mixin that compensates for trailing letter-spacing
  • Apply the mixin in one line wherever letter-spacing is needed