Last active
September 19, 2021 11:50
-
-
Save csssecrets/365c867441f3ee298212 to your computer and use it in GitHub Desktop.
Beveled corners — with border-image and an inline SVG
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
| /** | |
| * Beveled corners — with border-image and an inline SVG | |
| */ | |
| div { | |
| border: 21px solid transparent; | |
| border-image: 1 url('data:image/svg+xml,\ | |
| <svg xmlns="http://www.w3.org/2000/svg" width="3" height="3" fill="%2358a">\ | |
| <polygon points="0,1 1,0 2,0 3,1 3,2 2,3 1,3 0,2" />\ | |
| </svg>'); | |
| background: #58a; | |
| background-clip: padding-box; | |
| padding: .2em .3em; | |
| max-width: 12em; | |
| color: white; | |
| font: 150%/1.6 Baskerville, Palatino, serif; | |
| } |
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
| <div>Hey, focus! You’re supposed to be looking at my corners, not reading my text. The text is just placeholder!</div> |
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
| // alert('Hello world!'); |
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
| {"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment