#todayilearned

by @jm3 · aka John Manoogian3

Frequent, bite-size mini-milestone updates as I fast-forward merge* my front-end web development skills up to 2019 levels. Learn more

Named colors in Stylelint

Posted at — Jun 23, 2019

Today I learned you can configure your Stylelint config to whine whenever it sees hex colors in your stylesheets that could instead be represented as one of the 148 official CSS color keywords + aliases (PapayaWhip, LemonChiffon, DarkSlateGray, WhiteSmoke, etc.).

Why would you want this? IMHO because these colors are much easier to remember and sight-read than hex values. Which is simpler: DodgerBlue or #1E90FF?

THE PROSECUTION RESTS. Learn more.