Created
July 12, 2012 15:46
-
-
Save seamusleahy/3098949 to your computer and use it in GitHub Desktop.
Create a curve to text using Lettering.js, Sass, and Compass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add a wave alignment to your title text using Sass, Compass, and Lettering.js. | |
* | |
* Lettering.js wraps each letter with a span with a class of .char<#>. | |
* Compass provides math functions including the sin which provides the wave form. | |
*/ | |
$length: 11; // The word is 11 letters long | |
@for $i from 1 through $length { | |
.char#{$i} { | |
@include transform(translateY( sin(($i - 1)/($length - 1)*2*pi()) * -25px) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment