Skip to content

Instantly share code, notes, and snippets.

@nrrrdcore
Created May 23, 2012 08:21
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save nrrrdcore/2773866 to your computer and use it in GitHub Desktop.
Save nrrrdcore/2773866 to your computer and use it in GitHub Desktop.
Outlined Type Effect with CSS Text-Shadowing
body {
background-color: #FFF;
}
#wrapper {
width: 90%;
margin: 200px auto;
}
h1 {
font-family: 'Frontage';
font-size: 50px;
text-align: center;
color: #f9f9f9;
letter-spacing: -5px;
text-shadow: 0 1px 2px rgba(0,0,0,.15),
0 -1px 1px rgba(0,0,0,.1),
0 1px 20px #F9F9F9;
}
<body>
<div id="wrapper">
<h1>Outlined Type + CSS</h1>
</div>
</body>
@nrrrdcore
Copy link
Author

Outlined type + text-shadowing = Magic

Step 1: @font-face a beautiful outlined type like Frontage:

frontage outlined type

Step 2: Add text-shadowing:

frontage css text shadowing

Step 3: Experience the magic.

@stevenh512
Copy link

Another really cool effect.. probably won't Compass this one tonight since I'm about to get to bed, but I might play around with it a bit tomorrow. 😁

@flipactual
Copy link

I broke my eyes trying to read this... but I learned something too!

@daneden
Copy link

daneden commented May 23, 2012

Smart. Renders nicer than -webkit-text-stroke, too (and, y'know, there are other browsers.) Woop!

@stevenh512
Copy link

@shpoonj My eyes aren't that bad yet.. lol.. but I usually learn something new from these too, especially trying to make mixins out of them (forces me to spend a little time analyzing what each line does). 😁

@stevenh512
Copy link

Compass version here, took me a while to find the font 😁

@broccolini
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment