gale/scratch.html
2024-04-28 18:29:36 -04:00

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>