-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·211 lines (206 loc) · 6.38 KB
/
Copy pathindex.html
File metadata and controls
executable file
·211 lines (206 loc) · 6.38 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Elements | The Modern Web Component Library</title>
<link rel="stylesheet" href="./src/style.sass">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
font-family: 'Outfit', sans-serif;
background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
color: #fff;
min-height: 100vh;
overflow-x: hidden;
}
.hero {
text-align: center;
padding: 100px 20px 60px;
background: radial-gradient(circle at 50% 0%, rgba(52, 152, 219, 0.4) 0%, transparent 50%);
}
.hero h1 {
font-size: 4.5rem;
font-weight: 800;
margin: 0;
background: -webkit-linear-gradient(45deg, #00d2ff 0%, #3a7bd5 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}
.hero p {
font-size: 1.5rem;
font-weight: 300;
color: #cbd5e1;
max-width: 600px;
margin: 20px auto;
}
.nav-cards {
display: flex;
justify-content: center;
gap: 30px;
margin: 40px 0;
}
.glass-card {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 30px;
text-decoration: none;
color: #fff;
transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
width: 250px;
text-align: center;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
.glass-card:hover {
transform: translateY(-5px);
background: rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 32px rgba(0, 210, 255, 0.2);
}
.glass-card h3 {
margin: 0 0 10px 0;
font-size: 1.5rem;
color: #00d2ff;
}
.glass-card p {
margin: 0;
font-size: 0.9rem;
color: #94a3b8;
}
.container {
max-width: 1000px;
margin: 0 auto;
padding: 0 20px 100px;
}
.doc-section {
background: rgba(15, 23, 42, 0.6);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 16px;
padding: 40px;
margin-top: 40px;
}
.doc-section h2 {
margin-top: 0;
color: #38bdf8;
font-size: 2rem;
border-bottom: 1px solid rgba(255,255,255,0.1);
padding-bottom: 15px;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
padding: 15px;
text-align: left;
border-bottom: 1px solid rgba(255,255,255,0.05);
}
th {
color: #94a3b8;
font-weight: 600;
text-transform: uppercase;
font-size: 0.85rem;
letter-spacing: 1px;
}
code {
background: rgba(0,0,0,0.3);
padding: 4px 8px;
border-radius: 4px;
font-family: monospace;
color: #38bdf8;
}
</style>
</head>
<body>
<header class="hero">
<h1>Elements</h1>
<p>A highly modular, themeable Web Component library built with Vite, Shadow DOM, and modern SASS architecture.</p>
<div class="nav-cards">
<a href="playground.html" class="glass-card">
<h3>Playground</h3>
<p>Interactive testing environment to visually configure components.</p>
</a>
<a href="snippets.html" class="glass-card">
<h3>Snippets</h3>
<p>A gallery showcasing the limitless styling possibilities.</p>
</a>
</div>
</header>
<main class="container">
<div class="doc-section">
<h2>Variable Taxonomy: Themes (Colors)</h2>
<p>Themes define the color palettes using Semantic Functional Naming. These variables map to the <code>theme="..."</code> attribute (e.g. primary, alert, dark) and only control hues, lightness, and opacities.</p>
<table>
<thead>
<tr>
<th>Variable Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--surface-base</code></td>
<td>The background color of a container (e.g., the empty track of a meter, or background of a popup).</td>
</tr>
<tr>
<td><code>--surface-fill</code></td>
<td>The active/primary color (e.g., the progress bar of a meter, or active button background).</td>
</tr>
<tr>
<td><code>--surface-text</code></td>
<td>The typography color used within the component.</td>
</tr>
<tr>
<td><code>--border-color</code></td>
<td>The color applied to borders or outlines.</td>
</tr>
<tr>
<td><code>--overlay-stripe-color</code></td>
<td>The color overlay used for candy-stripe patterns.</td>
</tr>
</tbody>
</table>
</div>
<div class="doc-section">
<h2>Variable Taxonomy: Styles (Appearances)</h2>
<p>Styles define the physical appearances and effects. These map to the <code>variant="..."</code> attribute (e.g. flat, 3d, rounded) and control dimensions, radiuses, shadows, and animations.</p>
<table>
<thead>
<tr>
<th>Variable Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--surface-radius</code></td>
<td>Controls rounded corners (e.g., <code>0px</code> for flat, <code>25px</code> for pill-shaped).</td>
</tr>
<tr>
<td><code>--surface-shadow</code></td>
<td>Controls drop shadows or inner shadows to simulate depth.</td>
</tr>
<tr>
<td><code>--overlay-convex-opacity</code></td>
<td>Controls visibility of a 3D glossy/convex shine overlay (<code>0</code> for flat, <code>1</code> for 3D).</td>
</tr>
<tr>
<td><code>--border-width</code></td>
<td>Controls the thickness of the border.</td>
</tr>
<tr>
<td><code>--transition-speed</code></td>
<td>Controls the timing of animations (e.g. candy-stripe moving speed).</td>
</tr>
</tbody>
</table>
</div>
</main>
<script type="module" src="./src/script.js"></script>
</body>
</html>