-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (87 loc) · 2.58 KB
/
index.html
File metadata and controls
100 lines (87 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSSForge Test</title>
<link rel="stylesheet" href="main.css">
<style>
/* Example usage of the generated variables */
.color-test {
display: grid;
gap: var(--size-2);
padding: var(--size-3);
}
.color-swatch {
width: 100px;
height: 100px;
border-radius: 8px;
margin-bottom: var(--size-1);
}
/* Example color swatches */
.coral-100 {
background-color: var(--color-coral-100);
}
.mint-100 {
background-color: var(--color-mint-100);
}
/* Typography test */
.type-scale {
margin-top: 2rem;
display: grid;
gap: var(--text-base);
}
.type-scale h1 {
font-size: var(--text-4xl);
}
.type-scale h2 {
font-size: var(--text-3xl);
}
.type-scale h3 {
font-size: var(--text-2xl);
}
.type-scale p {
font-size: var(--text-lg);
}
</style>
</head>
<body>
<div class="color-test">
<h2>Color Test</h2>
<div>
<div class="color-swatch coral-100"></div>
<p>Primary 100</p>
</div>
<div>
<div class="color-swatch mint-100"></div>
<p>Primary 900</p>
</div>
</div>
<div class="type-scale">
<h2>Typography Scale Test</h2>
<h1>Heading Level 1</h1>
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<p>
This is a paragraph of text that demonstrates the base font size. It should be
comfortable to read and well-proportioned according to the type scale.
</p>
</div>
<div class="spacing-test">
<h2>Spacing Scale Test</h2>
<div style="background: #eee; padding: var(--size-1)">Size 1 padding</div>
<div style="background: #ddd; padding: var(--size-2)">Size 2 padding</div>
<div style="background: #ccc; padding: var(--size-3)">Size 3 padding</div>
</div>
<script>
// Optional: Add this to help debug which variables are available
const styles = getComputedStyle(document.documentElement);
const cssVariables = Array.from(document.styleSheets)
.filter((sheet) => sheet.href?.endsWith("test.css"))
.flatMap((sheet) => Array.from(sheet.cssRules))
.flatMap((rule) => Array.from(rule.style))
.filter((name) => name.startsWith("--"));
console.log("Available CSS Variables:", cssVariables);
</script>
</body>
</html>