Skip to content

Instantly share code, notes, and snippets.

@fxg42
Created November 16, 2012 17:22
Show Gist options
  • Save fxg42/4089173 to your computer and use it in GitHub Desktop.
Save fxg42/4089173 to your computer and use it in GitHub Desktop.
Draw a ribbon-like bookmark
// see: http://jsfiddle.net/DBA4Q/
@import 'nib'
bookmark(color, width)
width width
height (width * 2)
background linear-gradient(top, lighten(color, 35%) 5%, color 12%)
position relative
&:before
content '\272A'
position absolute
left 18%
top (width * 0.30)
font (width * 0.84) Arial
color darken(color, 35%)
text-shadow 0 1px rgba(white, 0.2)
&:after
content ''
position absolute
bottom 0
width 0
height 0
border-left (width / 2) dashed transparent
border-right @border-left
border-bottom (width * 0.30) dashed white
.bookmark-blue
bookmark rgb(53,121,183), 50px
.bookmark-red
bookmark rgb(179,43,46), 30px
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment