Skip to content

Instantly share code, notes, and snippets.

@johannaruiz
Created April 16, 2013 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johannaruiz/5394314 to your computer and use it in GitHub Desktop.
Save johannaruiz/5394314 to your computer and use it in GitHub Desktop.
3D to Letterpress - Experimenting with 3D text via the CSS3 text-shadow property in combination with CSS3 transitions to transition the 3D text to a true inset/letterpress text effect with text-shadow.
%ul
%li
%a{:title => @title, :href => "#"} Home
%li
%a{:title => @title, :href => "#"} About
%li
%a{:title => @title, :href => "#"} Contact
@import "compass"
body
font-size: 1em
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif
background: #f6f6f6
letter-spacing: .15em
text-align: center
ul
margin: 0
padding: 0
li
list-style-type: none
font-size: 2em
display: inline-block
margin: 0 1.5em
padding: 1em 1em
a
background-color: rgba(0, 0, 0, 0.1)
color: transparent
text-decoration: none
font-size: 3.5em
font-weight: bold
-webkit-transition: all .25s ease-in-out .1s
-moz-transition: all .25s ease-in-out .1s
-o-transition: all .25s ease-in-out .1s
-ms-transition: all .25s ease-in-out .1s
transition: all .25s ease-in-out .1s
background-clip: text
-moz-background-clip: text
-webkit-background-clip: text
text-shadow: 0 1px 0 #ddd, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15)
&:hover
background-color: #999
color: transparent
text-shadow: rgba(255,255,255,0.75) 0px 2px 3px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment