Skip to content

Instantly share code, notes, and snippets.

@sapegin
Created February 2, 2012 14:01
Show Gist options
  • Save sapegin/1723597 to your computer and use it in GitHub Desktop.
Save sapegin/1723597 to your computer and use it in GitHub Desktop.
CSS Button
.download
margin 50px
color hsla(0, 0%, 0%, .6)
&__button,
&__button:link,
&__button:visited,
&__button:hover,
&__button:active,
&__button:focus
display inline-block
padding 4px 8px
margin-right 4px
font-weight bold
color hsla(0, 0%, 100%, .85)
background hsl(205, 32%, 32%)
background linear-gradient(top, hsla(205, 32%, 45%, 1), hsla(205, 32%, 32%, 1))
border 1px solid
border-color hsl(205, 32%, 40%) hsl(205, 32%, 30%) hsl(205, 32%, 30%) hsl(205, 32%, 40%)
border-radius 3px
text-decoration none
text-shadow 0 -1px 0 hsla(0, 0%, 0%, .2)
box-shadow 0 0 1px hsla(0, 0%, 100%, .1) inset, 0 3px 1px 0 hsl(205, 32%, 20%), 0 4px 3px 1px hsla(0, 0%, 0%, .1)
&__button:hover
&__button:active
color hsla(0, 0%, 100%, .95)
background linear-gradient(top, hsla(205, 32%, 55%, 1), hsla(205, 32%, 42%, 1))
border-color hsl(205, 32%, 50%) hsl(205, 32%, 40%) hsl(205, 32%, 40%) hsl(205, 32%, 50%)
box-shadow 0 0 1px hsla(0, 0%, 100%, .1) inset, 0 3px 1px 0 hsl(205, 32%, 25%), 0 4px 3px 1px hsla(0, 0%, 0%, .1)
&__button:active
box-shadow 0 0 1px hsla(0, 0%, 100%, .1) inset, 0 1px 1px 0 hsl(205, 32%, 25%), 0 1px 2px 1px hsla(0, 0%, 0%, .1)
transform translateY(2px)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment