-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatum-grammar.demo.html
More file actions
217 lines (201 loc) · 10.2 KB
/
Copy pathdatum-grammar.demo.html
File metadata and controls
217 lines (201 loc) · 10.2 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
212
213
214
215
216
217
<!doctype html>
<html lang="de" data-theme="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Datum-Grammatik — Vorher / Nachher</title>
<!-- real Construct system -->
<link rel="stylesheet" href="/foundations.css">
<link rel="stylesheet" href="/components/index.css">
<style>
/* ============================================================================
PROPOSED: "Datum Grammar" — promote the orange reference-line vocabulary
(already living in .storybook/docs.css) INTO the component layer, and extend
it with two engineered primitives the system doesn't have yet:
· .ct-datum-scale — a measured reference line (ruler) with a marked origin
· .ct-card--datum — a corner registration mark, like an engineering drawing
a11y rule kept intact: orange-as-TEXT = accent-active (orange.700);
orange-as-EDGE/RULE = accent (orange.500).
============================================================================ */
/* — Eyebrow: lifted verbatim from docs.css, now unscoped (component-layer) — */
.ct-eyebrow {
display: inline-flex; align-items: center; gap: var(--space-4);
font-family: var(--font-family-mono);
font-size: 0.78rem; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.16em;
color: var(--color-brand-accent-active);
margin: 0 0 var(--space-5);
}
.ct-eyebrow::before {
content: ''; width: 24px; height: 3px; border-radius: 2px;
background: var(--color-brand-accent);
}
/* — NEW: the measured datum line. A hairline baseline with hanging ruler ticks
(minor every 12px, major every 60px) and an orange "origin" segment at 0. — */
.ct-datum-scale {
height: 9px; margin-top: var(--space-5);
background:
/* orange origin segment — marks the datum's zero */
linear-gradient(var(--color-brand-accent), var(--color-brand-accent)) 0 0 / 48px 2px no-repeat,
/* full-width baseline hairline */
linear-gradient(var(--color-border-strong), var(--color-border-strong)) 0 0 / 100% 1px no-repeat,
/* major ticks (taller) */
repeating-linear-gradient(90deg, var(--color-border-strong) 0 1px, transparent 1px 60px) 0 0 / 100% 8px no-repeat,
/* minor ticks */
repeating-linear-gradient(90deg, var(--color-border-default) 0 1px, transparent 1px 12px) 0 0 / 100% 5px no-repeat;
background-clip: padding-box;
}
/* — Section header: eyebrow + title + measured datum line — */
.ct-section { margin: 0 0 var(--space-9); }
.ct-section h2 { margin: 0; }
/* — NEW: corner registration mark on a card — */
.ct-card--datum { position: relative; }
.ct-card--datum::before {
content: ''; position: absolute; top: -1px; left: -1px;
width: 18px; height: 18px;
border-top: var(--border-medium) solid var(--color-brand-accent);
border-left: var(--border-medium) solid var(--color-brand-accent);
border-top-left-radius: var(--radius-card);
}
/* — Active card: the SAME leading edge the sidebar/list active item already uses
(inset 3px), now unified onto the card — */
.ct-card--active {
box-shadow: inset var(--border-thick) 0 0 0 var(--color-brand-accent), var(--shadow-card);
}
/* — Spec datasheet: lifted from docs.css ct-specs, unscoped + a marked origin — */
.ct-specs {
display: grid; grid-template-columns: repeat(2, 1fr);
gap: 1px; background: var(--color-border-subtle);
border: 1px solid var(--color-border-subtle); border-radius: var(--radius-lg);
overflow: hidden;
}
.ct-spec { background: var(--color-bg-elevated); padding: var(--space-7); position: relative; }
.ct-spec--origin { box-shadow: inset 0 var(--border-thick) 0 0 var(--color-brand-accent); }
.ct-spec__value {
font-family: var(--font-family-brand); font-weight: 800;
font-size: var(--font-size-4xl); line-height: 1; color: var(--color-text-primary);
}
.ct-spec__value small { font-size: var(--font-size-xl); font-weight: 700; }
.ct-spec__label {
display: block; margin-top: var(--space-4);
font-family: var(--font-family-mono); font-size: 0.72rem; font-weight: 600;
text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-text-secondary);
}
/* ============================================================================
Demo scaffolding only (not part of the proposal)
============================================================================ */
body { background: var(--color-bg-canvas); }
.wrap { width: min(100%, 1180px); margin-inline: auto; padding: var(--space-12) var(--space-9) var(--space-13); }
.page-eyebrow { margin-bottom: var(--space-6); }
.page-title { font-size: var(--font-size-5xl); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 var(--space-6); }
.page-lead { color: var(--color-text-secondary); max-width: 60ch; font-size: var(--font-size-lg); margin: 0 0 var(--space-12); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-9); margin-bottom: var(--space-12); align-items: start; }
.col { min-width: 0; }
.tag {
display: inline-block; margin-bottom: var(--space-6);
font-family: var(--font-family-mono); font-size: 0.7rem; font-weight: 600;
letter-spacing: 0.12em; text-transform: uppercase;
padding: var(--space-2) var(--space-5); border-radius: var(--radius-round);
}
.tag--before { color: var(--color-text-muted); background: var(--color-bg-muted); }
.tag--after { color: var(--color-brand-on-accent); background: var(--color-brand-accent); }
.pane { padding: var(--space-8); border: 1px dashed var(--color-border-default); border-radius: var(--radius-lg); background: var(--color-bg-surface); }
.plain-stats { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-9); }
.plain-stat .n { font-family: var(--font-family-brand); font-weight: 800; font-size: var(--font-size-4xl); line-height: 1; }
.plain-stat .l { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.demo-h2 { font-size: var(--font-size-3xl); margin: 0; }
.card-meta { color: var(--color-text-muted); font-size: var(--font-size-sm); margin: var(--space-2) 0 0; }
.card-grid { display: grid; gap: var(--space-6); }
.sectionmark { font-family: var(--font-family-mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 var(--space-5); }
</style>
</head>
<body>
<div class="wrap">
<p class="ct-eyebrow page-eyebrow">Vorschlag · Datum-Grammatik</p>
<h1 class="page-title">Die Signatur wird zur Bauteil-Sprache.</h1>
<p class="page-lead">Das Datum lebt heute fast nur im Fokusring und auf der Intro-Seite. Dieselbe orange Bezugslinie — als Eyebrow-Tick, gemessene Linie, Eck-Registermarke und Leading-Edge — macht aus den braven Bauteilen erkennbar <em>dasselbe</em> System. Links der Status quo, rechts die Grammatik.</p>
<!-- ============================ A · SECTION HEADER ===================== -->
<p class="sectionmark">A — Abschnitts-Kopf</p>
<div class="row">
<div class="col">
<span class="tag tag--before">Vorher</span>
<div class="pane">
<h2 class="demo-h2">Komponenten</h2>
</div>
</div>
<div class="col">
<span class="tag tag--after">Nachher</span>
<div class="pane">
<div class="ct-section">
<p class="ct-eyebrow">40+ Bausteine · framework-agnostisch</p>
<h2 class="demo-h2">Komponenten</h2>
<div class="ct-datum-scale" role="presentation"></div>
</div>
</div>
</div>
</div>
<!-- ================================ B · CARD ========================== -->
<p class="sectionmark">B — Card (inkl. aktivem Zustand)</p>
<div class="row">
<div class="col">
<span class="tag tag--before">Vorher</span>
<div class="pane">
<div class="card-grid">
<div class="ct-card">
<h3 style="margin:0">Design Tokens</h3>
<p class="card-meta">Eine Quelle der Wahrheit für jede visuelle Entscheidung.</p>
</div>
<div class="ct-card">
<h3 style="margin:0">Theming</h3>
<p class="card-meta">Light, Dark & High-Contrast — automatischer Fallback.</p>
</div>
</div>
</div>
</div>
<div class="col">
<span class="tag tag--after">Nachher</span>
<div class="pane">
<div class="card-grid">
<div class="ct-card ct-card--datum">
<p class="ct-eyebrow" style="margin-bottom:var(--space-4)">Foundations</p>
<h3 style="margin:0">Design Tokens</h3>
<p class="card-meta">Eine Quelle der Wahrheit für jede visuelle Entscheidung.</p>
</div>
<div class="ct-card ct-card--datum ct-card--active">
<p class="ct-eyebrow" style="margin-bottom:var(--space-4)">Theming · aktiv</p>
<h3 style="margin:0">Theming</h3>
<p class="card-meta">Light, Dark & High-Contrast — automatischer Fallback.</p>
</div>
</div>
</div>
</div>
</div>
<!-- ============================== C · STATS =========================== -->
<p class="sectionmark">C — Kennzahlen / Spec-Strip</p>
<div class="row">
<div class="col">
<span class="tag tag--before">Vorher</span>
<div class="pane">
<div class="plain-stats">
<div class="plain-stat"><div class="n">40+</div><div class="l">Komponenten</div></div>
<div class="plain-stat"><div class="n">3</div><div class="l">Themes</div></div>
<div class="plain-stat"><div class="n">AA</div><div class="l">WCAG 2.1</div></div>
<div class="plain-stat"><div class="n">0kb</div><div class="l">Runtime JS</div></div>
</div>
</div>
</div>
<div class="col">
<span class="tag tag--after">Nachher</span>
<div class="pane">
<div class="ct-specs">
<div class="ct-spec ct-spec--origin"><div class="ct-spec__value">40<small>+</small></div><span class="ct-spec__label">Komponenten</span></div>
<div class="ct-spec"><div class="ct-spec__value">3</div><span class="ct-spec__label">Themes</span></div>
<div class="ct-spec"><div class="ct-spec__value">AA</div><span class="ct-spec__label">WCAG 2.1</span></div>
<div class="ct-spec"><div class="ct-spec__value">0<small>kb</small></div><span class="ct-spec__label">Runtime JS</span></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>