Skip to content

Instantly share code, notes, and snippets.

Fabrice Lejeune fabricelejeune

Block or report user

Report or block fabricelejeune

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Efficient font stack with Sass.md

Efficient font stack with Sass

The strength of Sass is the mixins and functions. Being able to automate many of the repetitive coding for CSS is both amazing in building and maintaining a clean and efficient code. I often find many developers creating complex systems for simple tasks, such as managing a font stack. This can be tedious to set up and employ. In this article, I will explain how I automate this system.

The font stack is one of those problems which are often solved by simple variables. In this instance, it makes a lot of sense and is easy enough to work with. But when you work with our (beloved) designers from Dogstudio, you can be sure of having to use lot of font variants. It quickly happens that I do not remember all the properties of each variants. And when I say "use lot of font variants", I mean at least 15 in most cases.

Sass maps to the rescue

Instead of simply define variables, I will ceate a font stack map and a mixin to use the map easily.

View keybase.md

Keybase proof

I hereby claim:

  • I am fabricelejeune on github.
  • I am fabricelejeune (https://keybase.io/fabricelejeune) on keybase.
  • I have a public key whose fingerprint is D7EA 32A8 01D6 9291 0793 0DAE 6558 40B7 561D 8B5D

To claim this, I am signing this object:

You can’t perform that action at this time.