Last active
August 28, 2015 10:10
-
-
Save b4z81/d642602046f7d9625bcf to your computer and use it in GitHub Desktop.
Revisions
-
b4z81 revised this gist
Aug 28, 2015 . No changes.There are no files selected for viewing
-
b4z81 created this gist
Aug 28, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Mixing vw and vh in font-size ----------------------------- To create text that always fill the viewport, no matter what ratio. This is just a concept and not very well tested ;-) A [Pen](http://codepen.io/CrocoDillon/pen/fBJxu) by [CrocoDillon](http://codepen.io/CrocoDillon) on [CodePen](http://codepen.io/). [License](http://codepen.io/CrocoDillon/pen/fBJxu/license). 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <p>Using calc in combination with vw and vh units for font-size to create text that always fills the viewport. No matter what ratio.</p> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ body { color: slategray; font-family: 'Abril Fatface'; line-height: 1.2; } p { margin: 0; font-size: calc(4vw + 4vh + 2vmin); /* See: * http://codepen.io/CrocoDillon/pen/jgmwt * For some math behind this */ } 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <link href="//fonts.googleapis.com/css?family=Abril+Fatface" rel="stylesheet" />