Skip to content

Instantly share code, notes, and snippets.

@LL782
Created October 3, 2014 16:34
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 LL782/2011611bc97ca3c48e7f to your computer and use it in GitHub Desktop.
Save LL782/2011611bc97ca3c48e7f to your computer and use it in GitHub Desktop.
Font that scales with container's width
/**
* Font that scales with container's width
*/
html {
background: #f06;
background: linear-gradient(45deg, #f06, black);
min-height: 100%;
color: #fff;
font-family: sans-serif;
font-weight: bolder;
text-transform: uppercase;
}
container {
font-size: 8vmax;
height: 8vmax;
line-height: 1;
position: absolute;
margin-top: -4vmax;
top: 50%;
width: 100%;
<!-- content to be placed inside <body>…</body> -->
<container>
text
</container>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment