Skip to content

Instantly share code, notes, and snippets.

@nathos
Last active December 17, 2016 01:54
Show Gist options
  • Save nathos/4759212 to your computer and use it in GitHub Desktop.
Save nathos/4759212 to your computer and use it in GitHub Desktop.
Diagonal CSS stripe Sass/Compass mixin.
@mixin striped-bg($bg-color: #ccc, $darken-amount: 5%, $stripe-color: darken($bg-color, $darken-amount))
background-color: $bg-color
@include background-image(linear-gradient(-45deg, $stripe-color 25%, transparent 25%, transparent 50%, $stripe-color 50%, $stripe-color 75%, transparent 75%, transparent))
background-size: 40px 40px
.warning
font-family: sans-serif
font-weight: bold
color: #333
text-align: center
margin: 2em 1em
padding: 0.5em
@include text-shadow(rgba(255,255,255,0.9) 0 1px 1px)
@include striped-bg(#fcc101, 4%)
@nathos
Copy link
Author

nathos commented Feb 12, 2013

See the live example at http://codepen.io/nathos/pen/ablfk

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