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
| /** | |
| * Parallelograms — with pseudoelements | |
| */ | |
| .button { | |
| position: relative; | |
| display: inline-block; | |
| padding: .5em 1em; | |
| border: 0; margin: .5em; | |
| background: transparent; |
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
| /** | |
| * Parallelograms — with extra HTML element | |
| */ | |
| .button { transform: skewX(45deg); } | |
| .button > div { transform: skewX(-45deg); } | |
| .button { | |
| display: inline-block; | |
| padding: .5em 1em; |
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
| /** | |
| * Flexible quarter ellipse | |
| */ | |
| div { | |
| display: inline-block; | |
| width: 16em; | |
| height: 10em; | |
| margin: 1em; | |
| background: #fb3; |
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
| /** | |
| * Flexible half ellipse | |
| */ | |
| div { | |
| display: inline-block; | |
| width: 16em; | |
| height: 10em; | |
| margin: 1em; | |
| background: #fb3; |
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
| /** | |
| * Flexible ellipse | |
| */ | |
| div { | |
| width: 16em; | |
| height: 10em; | |
| background: #fb3; | |
| border-radius: 50%; | |
| } |
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 clip-path | |
| */ | |
| div { | |
| background: #58a; | |
| -webkit-clip-path: | |
| polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), | |
| calc(100% - 20px) 100%, | |
| 20px 100%, 0 calc(100% - 20px), 0 20px); |
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>'); |
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 gradients | |
| */ | |
| div { | |
| background: #58a; | |
| background: linear-gradient(135deg, transparent 15px, #58a 0) top left, | |
| linear-gradient(-135deg, transparent 15px, #58a 0) top right, | |
| linear-gradient(-45deg, transparent 15px, #58a 0) bottom right, | |
| linear-gradient(45deg, transparent 15px, #58a 0) bottom left; |
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
| /** | |
| * Scoop corners | |
| */ | |
| div { | |
| background: #58a; | |
| background: radial-gradient(circle at top left, transparent 15px, #58a 0) top left, | |
| radial-gradient(circle at top right, transparent 15px, #58a 0) top right, | |
| radial-gradient(circle at bottom right, transparent 15px, #58a 0) bottom right, | |
| radial-gradient(circle at bottom left, transparent 15px, #58a 0) bottom left; |
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
| /** | |
| * Checkerboard with SVG | |
| */ | |
| background: #eee url('data:image/svg+xml,\ | |
| <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill-opacity=".25" >\ | |
| <rect x="50" width="50" height="50" />\ | |
| <rect y="50" width="50" height="50" />\ | |
| </svg>'); | |
| background-size: 30px 30px; |