Created
October 23, 2012 18:40
-
-
Save xav76/3940684 to your computer and use it in GitHub Desktop.
A CodePen by Jeroen Franse. Add .stitch - Just add the .stitch class to your shapes and get a nice stitch effect. I know, this effect is getting old.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %h1 Add .stitch | |
| .box | |
| .circle | |
| .circle.stitch | |
| .box | |
| .square | |
| .square.stitch | |
| .box | |
| .shape | |
| .shape.stitch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import "compass"; | |
| *,*:before,*:after { | |
| box-sizing:border-box; | |
| } | |
| body{ | |
| background:#ddd; | |
| text-align:center; | |
| } | |
| $background-color: #b14336; | |
| .box { | |
| margin:20px auto 50px; | |
| text-align:center; | |
| width:80%; | |
| } | |
| h1 { | |
| background-color:$background-color; | |
| background-size:12px 100% ,100% 20px; | |
| font-size:100px; | |
| font-weight:bold; | |
| height:120px; | |
| margin:0 auto; | |
| width:80%; | |
| -webkit-background-clip:content; | |
| -webkit-text-fill-color:transparent; | |
| -webkit-text-stroke:1px #333; | |
| -webkit-background-clip:text; | |
| } | |
| .circle { | |
| background-color: $background-color; | |
| border-radius:50%; | |
| display:inline-block; | |
| margin:10px; | |
| height:200px; | |
| width:200px; | |
| } | |
| .square { | |
| background-color: $background-color; | |
| display:inline-block; | |
| height:200px; | |
| margin:10px; | |
| width:200px; | |
| } | |
| .shape { | |
| background-color: $background-color; | |
| border-radius:50%; | |
| display:inline-block; | |
| height:200px; | |
| margin:10px; | |
| width:400px; | |
| } | |
| .stitch { | |
| background-color:$background-color; | |
| //background-image: -webkit-radial-gradient(60% 55%, circle closest-corner, red, green 20%, yellow 70%, black); | |
| box-shadow: 0 0 10px rgba(0,0,0,0.1), 1px 1px 0 8px $background-color, inset 0 0 18px rgba(0,0,0,.2); | |
| position:relative; | |
| background-clip: padding,content; | |
| } | |
| .stitch:before{ | |
| content:" "; | |
| background-color:transparent; | |
| border-radius:inherit; | |
| border:2px dashed #CACDAC; | |
| display:block; | |
| height:inherit; | |
| left:0px; | |
| position:absolute; | |
| top:0px; | |
| width:inherit; | |
| z-index:4; | |
| } | |
| .stitch:after{ | |
| content:" "; | |
| background-color:transparent; | |
| border-radius:inherit; | |
| border:2px dashed #65261F; | |
| display:block; | |
| height:inherit; | |
| left:1px; | |
| position:absolute; | |
| top:2px; | |
| width:inherit; | |
| z-index:3; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment