Created
March 15, 2018 16:59
-
-
Save kyagrd/8127b53a3cf388bf367ec7cf3441f5c6 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/wonecub
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 characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
body { | |
font-size: calc(var(--font-size) * 1pt); | |
} | |
</style> | |
</head> | |
<body> | |
<input type="text" | |
name="number" | |
value="" | |
onchange="setFontSize(this.value);" /> | |
<p> | |
hello world | |
</p> | |
<script id="jsbin-javascript"> | |
// document.body.style.setProperty('--font-size',40); | |
function setFontSize(n) { | |
document.body.style.setProperty('--font-size',n); | |
} | |
</script> | |
<script id="jsbin-source-css" type="text/css">body { | |
font-size: calc(var(--font-size) * 1pt); | |
}</script> | |
<script id="jsbin-source-javascript" type="text/javascript">// document.body.style.setProperty('--font-size',40); | |
function setFontSize(n) { | |
document.body.style.setProperty('--font-size',n); | |
}</script></body> | |
</html> |
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 characters
body { | |
font-size: calc(var(--font-size) * 1pt); | |
} |
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 characters
// document.body.style.setProperty('--font-size',40); | |
function setFontSize(n) { | |
document.body.style.setProperty('--font-size',n); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment