Skip to content

Instantly share code, notes, and snippets.

@bugsysop
Created October 8, 2017 23:17
Show Gist options
  • Select an option

  • Save bugsysop/761f656e8972eff01eefaf5caca61bad to your computer and use it in GitHub Desktop.

Select an option

Save bugsysop/761f656e8972eff01eefaf5caca61bad to your computer and use it in GitHub Desktop.
Typography
.cover
p.author john doe
p.stack Competition
p.tagline The new typography
$ ->
$('.stack').lettering();
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lettering.js/0.7.0/jquery.lettering.min.js"></script>
<script src="//use.edgefonts.net/bebas-neue;cardo;playfair-display.js"></script>
.cover{
background-color:#000;
color:#fff;
padding:20px;
width:410px;
margin:20px auto;
text-align:center;
p{
margin:0;
font-family:playfair-display, Arial,serif;
}
.author{
font-size:2em;
letter-spacing:0.65em;
text-transform:uppercase;
font-weight:100;
line-height:1em;
margin-bottom:1.6em;
&:first-letter{
font-size:2.2em;
display:inline-block;
}
}
.tagline{
font-size:1.2em;
letter-spacing:0.2em;
margin:1em 0;
text-transform:capitalize;
font-family:cardo;
}
.stack{
font-family:bebas-neue,sans-serif;
font-size:18em;
line-height:0.7em;
word-wrap:break-word;
overflow-wrap:break-word;
span{
position:relative;
}
.char1{
margin-left:-0.05em;
z-index:10;
text-shadow:0.05em 0.05em 0.2em rgba(10,10,10,0.8);
}
.char2{
margin-left:-0.09em;
top:0.05em;
z-index:9;
text-shadow:0.05em 0.01em 0.3em rgba(10,10,10,0.8);
}
.char3{
margin-left:-0.05em;
z-index:15;
text-shadow:-0.02em 0.02em 0.14em rgba(10,10,10,0.8);
}
.char4{
margin-left:-0.05em;
top:-0.01em;
z-index:12;
text-shadow:0.01em -0.01em 0.14em rgba(10,10,10,0.8);
}
.char5{
margin-left:-0.06em;
top:0.02em;
z-index:4;
text-shadow:-0.02em -0.02em 0.14em rgba(10,10,10,0.8);
}
.char6{
margin-left:-0.06em;
top:-0.02em;
z-index:18;
text-shadow:-0.02em -0.02em 0.14em rgba(10,10,10,0.8);
}
.char7{
margin-left:-0.05em;
z-index:17;
text-shadow:-0.02em -0.02em 0.14em rgba(10,10,10,0.8);
}
.char8{
margin-left:-0.08em;
top:-0.02em;
z-index:13;
text-shadow:-0.02em -0.02em 0.14em rgba(10,10,10,0.8);
}
.char9{
margin-left:-0.08em;
z-index:16;
text-shadow:-0.02em -0.02em 0.14em rgba(10,10,10,0.8);
}
.char10{
margin-left:-0.03em;
top:-0.02em;
z-index:2;
text-shadow:0.05em 0.05em 0.14em rgba(10,10,10,0.8);
}
.char11{
margin-left:-0.08em;
top:-0.02em;
z-index:1;
text-shadow:-0.02em -0.02em 0.14em rgba(10,10,10,0.8);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment