tubeshowcase●1,674,523 videos♡ My collection 0
← Learn to Code

Learn to Code07:11

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

Kevin Powell ↗

From the creator

When you add letter-spacing to your text with CSS, it causes alignment problems with center and right aligned text. There is a simple way to fix it, but it requires writing two lines of CSS when all you want to do is add some letter-spacing! Sass is a perfect solution for things like this, where we can use a simple mixin, which once created, will allow us to write only one line of code, and get the desired result :) Codepen: https://codepen.io/kevinpowell/pen/LXZOJx/ I also have an article on the do's and don'ts of letter-spacing: https://www.kevinpowell.co/article/letter-spacing-dos-and-donts/ #fiveminutefriday --- I have a newsletter! https://www.kevinpowell.co/newsletter New to Sass, or want to step up your game with it? I've got a course just for you: https://www.kevinpowell.co/learn-sass --- My Code Editor: VS Code - https://code.visualstudio.com/ How my browser refreshes when I save: https://youtu.be/h24noHYsuGc --- Support me on Patreon: https://www.patreon.com/kevinpowell I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Instagram: https://www.instagram.com/kevinpowell.co/ Twitter: https://twitter.com/KevinJPowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell

Published 2018-11-16 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code