📜 ⬆️ ⬇️

Kerning.js

It is finished, now the wonders of typography have become available to us mere mortals .

How to use


Yes, easy, just connect and use.
<script src="kerning.js"></script> 

Nothing more is needed, she will do the rest herself.


')

What can


She knows how to truly amazing things.

Kerning

Kerning for each letter.
 #pixel-perfect { -letter-kern: 1px 1px 0 0 0 1px 0 2px 0 0 0 0 0; } 

Kerning

Size adjustment

Just indicate which letter is which size.
 #hello-goodbye { -letter-size: _ _ _ _ _ 0.5em; } 

Alternative option
 #hello-goodbye { -letter-size: _^5 0.5em; } 

Size adjustment

Color

Paint the words
 #pantone-please { -word-color: #f5474b #000000; } 

Color

Transformations

Turn the little letters :)
 #little-lean { -letter-transform: skew(-5deg) none none none none none skew(-5deg); } 

Transformations

Repeats

The sea is worried once.
 #double-bubble { -letter-transform: -letter-repeats( 2n+1: translate3d(0,-5px,0), even: translate3d(0,5px,0) ); } 

Repeats

Project site on GitHub

Well, now the saddest thing.
Truly, this library shows all its power only in WebKit-based browsers, it works only partially in Firefox, it doesn't work at all in Opera.

Source: https://habr.com/ru/post/128848/


All Articles