Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created March 15, 2023 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeaVerou/c677267e95c93192fab41eb934a5bd44 to your computer and use it in GitHub Desktop.
Save LeaVerou/c677267e95c93192fab41eb934a5bd44 to your computer and use it in GitHub Desktop.
Number of angles created by corner-shape
/**
* Number of angles created by corner-shape
*/
path {
fill: slategray;
}
text {
font: bold 100% Helvetica Neue;
fill: white;
}
<svg width="400" height="300" id="simulated">
<path d="M 40 0 h 320 l 40 40 v 220 l -40 40 h -320 l -40 -40 v -220 l 40 -40 Z"></path>
<text x="10" y="54">1</text>
<text x="42" y="20">2</text>
<text x="340" y="20">3</text>
<text x="374" y="54">4</text>
<g transform="translate(330, 230)">
<text x="10" y="54">6</text>
<text x="42" y="20">5</text>
</g>
<g transform="translate(-330, 230)">
<text x="340" y="20">8</text>
<text x="374" y="54">7</text>
</g>
</svg>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment