44 lines
632 B
HTML
44 lines
632 B
HTML
|
<script>
|
||
|
|
||
|
const typeface = {
|
||
|
sans: "sans serif",
|
||
|
serif: "Times New Roman"
|
||
|
};
|
||
|
const sizes = {
|
||
|
"1": "1rem",
|
||
|
"2": "3rem"
|
||
|
};
|
||
|
const colors = {
|
||
|
red: "#ff2200",
|
||
|
blue: "#0022ff"
|
||
|
};
|
||
|
|
||
|
const context = [];
|
||
|
const CSS = {
|
||
|
get Face()
|
||
|
{
|
||
|
context.push("font-family");
|
||
|
return new Proxy(typeface, {get(target, prop){
|
||
|
console.log(target, prop);
|
||
|
context.push(target[prop]);
|
||
|
}})
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
const output = CSS.Face.sans;
|
||
|
|
||
|
console.log(output);
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
@media(min-width:768px)
|
||
|
{
|
||
|
.large{ font-size: 3rem; }
|
||
|
}
|
||
|
|
||
|
</style>
|
||
|
<div class="md-font-large large">
|
||
|
hey
|
||
|
</div>
|