Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Last active September 28, 2021 20:08
Show Gist options
  • Save csssecrets/7a665ce85190f9cb201e to your computer and use it in GitHub Desktop.
Save csssecrets/7a665ce85190f9cb201e to your computer and use it in GitHub Desktop.
Stroked text
/**
* Stroked text
*/
h1 {
margin: 0;
color: white;
}
h1:first-child { text-shadow: 1px 1px black, -1px -1px black, 1px -1px black, -1px 1px black; }
h1 text { fill: currentColor }
h1 use {
stroke: black;
stroke-width: 6;
stroke-linejoin: round;
}
body {
background: deeppink;
font: bold 200%/1 Rockwell, serif;
}
<h1>CSS</h1>
<h1><svg overflow="visible" width="2em" height="1.2em"><use xlink:href="#css" /><text id="css" y="1em">CSS</text></svg></h1>
// 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