Created
January 30, 2018 12:31
-
-
Save wnas/db3cb00a62f65048e4c2ea4f86a0e8ae to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/kiyejil
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"> | |
:root { | |
--fs: 1rem; | |
--pad: 1rem; | |
--mar: .5rem; | |
--col: #f00; | |
} | |
body { | |
font-size: var(--fs); | |
color: var(--col); | |
font-family: helvetica, sans-serif; | |
} | |
h1 { | |
margin: 0; | |
padding-bottom: var(--pad); | |
} | |
p { | |
margin: var(--mar); | |
} | |
@media all and (min-width: 600px) { | |
:root { | |
--fs: 1.5rem; | |
--pad: 2rem; | |
--mar: 2rem; | |
--col: #fa0; | |
} | |
} | |
@media all and (min-width: 1000px) { | |
:root { | |
--fs: 2rem; | |
--pad: 3rem; | |
--mar: 1rem; | |
--col: #f90; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<h1>Header</h1> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores ab sit aliquid doloribus? Consequatur est, non porro aspernatur harum consectetur corporis ratione unde ex temporibus. Neque ipsam ut minus architecto.</p> | |
</div> | |
<script id="jsbin-source-css" type="text/css">:root { | |
--fs: 1rem; | |
--pad: 1rem; | |
--mar: .5rem; | |
--col: #f00; | |
} | |
body { | |
font-size: var(--fs); | |
color: var(--col); | |
font-family: helvetica, sans-serif; | |
} | |
h1 { | |
margin: 0; | |
padding-bottom: var(--pad); | |
} | |
p { | |
margin: var(--mar); | |
} | |
@media all and (min-width: 600px) { | |
:root { | |
--fs: 1.5rem; | |
--pad: 2rem; | |
--mar: 2rem; | |
--col: #fa0; | |
} | |
} | |
@media all and (min-width: 1000px) { | |
:root { | |
--fs: 2rem; | |
--pad: 3rem; | |
--mar: 1rem; | |
--col: #f90; | |
} | |
}</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
:root { | |
--fs: 1rem; | |
--pad: 1rem; | |
--mar: .5rem; | |
--col: #f00; | |
} | |
body { | |
font-size: var(--fs); | |
color: var(--col); | |
font-family: helvetica, sans-serif; | |
} | |
h1 { | |
margin: 0; | |
padding-bottom: var(--pad); | |
} | |
p { | |
margin: var(--mar); | |
} | |
@media all and (min-width: 600px) { | |
:root { | |
--fs: 1.5rem; | |
--pad: 2rem; | |
--mar: 2rem; | |
--col: #fa0; | |
} | |
} | |
@media all and (min-width: 1000px) { | |
:root { | |
--fs: 2rem; | |
--pad: 3rem; | |
--mar: 1rem; | |
--col: #f90; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment