Skip to content

Instantly share code, notes, and snippets.

@sdaitzman
Created October 3, 2012 17:23
Show Gist options
  • Save sdaitzman/3828437 to your computer and use it in GitHub Desktop.
Save sdaitzman/3828437 to your computer and use it in GitHub Desktop.
<div class="one">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
</div>
<br><br>
<div class="two">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
</div>
<button>This is a button</button>
/*
* No JS used (aside from this comment)
* Feel free to modify and use; creds to @sdaitzman if you're feeling nice
* i'll post a link to my site when it's done
* sorry if someone else made this already, I honestly didn't know
*/
@import "compass";
@mixin stitched($color: black, $background: white, $width: 2px, $shadow: 4px, $radius: 3px, $padding: auto/*padding and border radiusrecommended but not necessary*/) {
border: $width dashed $color;
box-shadow: 0 0 0 $shadow $background, 2px 1px $shadow 4px $background;
border-radius: $radius;
padding: $padding;
}
div.one {
@include stitched(white, black, 3px, 4.5px, 2px, 20px);
background: black;
color: white;
}
button {
@include stitched();
&:hover {
}
}
div.two {
@include stitched(black, darken(red, 20%), 3px, 4.5px, 2px, 20px);
background: darken(red, 20%);
color: #fido;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment