Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Created January 23, 2015 06:21
Show Gist options
  • Select an option

  • Save csssecrets/4a88c463afdb0778e973 to your computer and use it in GitHub Desktop.

Select an option

Save csssecrets/4a88c463afdb0778e973 to your computer and use it in GitHub Desktop.
Beveled corners — with clip-path
/**
* 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);
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);
padding: 1em 1.2em;
max-width: 12em;
color: white;
font: 150%/1.6 Baskerville, Palatino, serif;
}
<div>Hey, focus! You’re supposed to be looking at my corners, not reading my text. The text is just placeholder!</div>
// alert('Hello world!');
{"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