Skip to content

Commit 154c092

Browse files
Claude attempt to make form builder DASH compliant
1 parent 370175c commit 154c092

3 files changed

Lines changed: 1242 additions & 244 deletions

File tree

shacl-demo/css/style.css

Lines changed: 146 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
--col-instance: #f59e0b;
1414
--col-literal: #3b82f6;
1515
--mono: 'Fira Code', monospace;
16+
--nested-bg: #162032;
17+
--nested-border: #2d4a6f;
1618
}
1719

1820
body {
@@ -186,7 +188,6 @@ h1 {
186188
text-transform: uppercase;
187189
}
188190

189-
/* Stat item hover effect */
190191
.stat-item:hover strong {
191192
color: var(--accent);
192193
}
@@ -256,6 +257,13 @@ input:focus, select:focus, textarea:focus {
256257
margin-bottom: 4px;
257258
}
258259

260+
/* Tooltip indicator for fields with sh:description */
261+
.role-label.has-tooltip {
262+
cursor: help;
263+
border-bottom: 1px dotted var(--text-muted);
264+
display: inline-block;
265+
}
266+
259267
.compact-row {
260268
display: flex;
261269
gap: 8px;
@@ -279,6 +287,129 @@ input:focus, select:focus, textarea:focus {
279287
margin-top: 0.25rem;
280288
}
281289

290+
/* ============================================
291+
DASH WIDGET STYLES
292+
============================================ */
293+
294+
/* Shape-level example sentence (skos:example) */
295+
.shape-example {
296+
background: rgba(56, 189, 248, 0.08);
297+
border: 1px solid rgba(56, 189, 248, 0.2);
298+
border-radius: 6px;
299+
padding: 8px 12px;
300+
margin-bottom: 12px;
301+
font-size: 0.8rem;
302+
color: var(--text-muted);
303+
font-style: italic;
304+
line-height: 1.5;
305+
}
306+
307+
.shape-example .example-label {
308+
color: var(--accent);
309+
font-weight: 600;
310+
font-style: normal;
311+
margin-right: 4px;
312+
}
313+
314+
/* Field description (sh:description) */
315+
.field-description {
316+
font-size: 0.7rem;
317+
color: var(--text-muted);
318+
margin-bottom: 4px;
319+
line-height: 1.4;
320+
opacity: 0.8;
321+
font-style: italic;
322+
}
323+
324+
/* ── dash:DetailsEditor — Nested form ──────────────── */
325+
.details-widget-container {
326+
display: flex;
327+
flex-direction: column;
328+
width: 100%;
329+
}
330+
331+
.nested-form {
332+
background: var(--nested-bg);
333+
border: 1px solid var(--nested-border);
334+
border-radius: 8px;
335+
padding: 10px;
336+
margin-top: 2px;
337+
}
338+
339+
.nested-form-header {
340+
font-size: 0.7rem;
341+
font-weight: 700;
342+
color: var(--accent);
343+
text-transform: uppercase;
344+
letter-spacing: 0.5px;
345+
margin-bottom: 8px;
346+
padding-bottom: 6px;
347+
border-bottom: 1px solid var(--nested-border);
348+
}
349+
350+
.nested-role-row {
351+
margin-bottom: 8px;
352+
}
353+
354+
.nested-role-row .role-label {
355+
font-size: 0.75rem;
356+
color: #93c5fd;
357+
}
358+
359+
.nested-role-row .field-description {
360+
font-size: 0.65rem;
361+
}
362+
363+
.nested-role-row .compact-row {
364+
gap: 6px;
365+
}
366+
367+
.nested-role-row input,
368+
.nested-role-row select,
369+
.nested-role-row textarea {
370+
font-size: 0.85rem;
371+
padding: 0.45rem;
372+
}
373+
374+
/* ── dash:DatePickerEditor — Date type selector ────── */
375+
.date-type-select {
376+
flex: 0 0 140px;
377+
background: var(--panel);
378+
font-size: 0.8rem;
379+
}
380+
381+
.date-input {
382+
flex: 1;
383+
}
384+
385+
/* Date input color scheme for dark mode */
386+
input[type="date"],
387+
input[type="month"],
388+
input[type="datetime-local"] {
389+
color-scheme: dark;
390+
}
391+
392+
/* ── dash:TextAreaEditor ───────────────────────────── */
393+
.textarea-widget {
394+
min-height: 60px;
395+
resize: vertical;
396+
font-family: var(--mono);
397+
font-size: 0.85rem;
398+
line-height: 1.5;
399+
}
400+
401+
/* ── dash:URIEditor ────────────────────────────────── */
402+
.uri-input {
403+
font-family: var(--mono);
404+
font-size: 0.85rem;
405+
color: var(--accent);
406+
}
407+
408+
/* ── dash:EnumSelectEditor ─────────────────────────── */
409+
.enum-select {
410+
background: var(--panel);
411+
}
412+
282413
/* ============================================
283414
BUTTON STYLES
284415
============================================ */
@@ -305,7 +436,6 @@ button:disabled {
305436
display: block;
306437
}
307438

308-
/* The 4-button aligned grid */
309439
.action-grid {
310440
display: grid;
311441
grid-template-columns: 1fr 1fr;
@@ -423,9 +553,9 @@ textarea#ttlInput {
423553
background: #1a1500;
424554
border: 1px solid #422006;
425555
border-radius: 6px;
426-
overflow: visible; /* was 'hidden' — caused the pre to be clipped to zero height */
556+
overflow: visible;
427557
margin-top: 10px;
428-
flex-shrink: 0; /* prevents flex from crushing it */
558+
flex-shrink: 0;
429559
animation: fadeIn 0.3s ease;
430560
}
431561

@@ -442,7 +572,7 @@ textarea#ttlInput {
442572
font-weight: 600;
443573
text-transform: uppercase;
444574
letter-spacing: 0.5px;
445-
border-radius: 6px 6px 0 0; /* re-applied since overflow is no longer hidden */
575+
border-radius: 6px 6px 0 0;
446576
}
447577

448578
#reportContent {
@@ -451,8 +581,8 @@ textarea#ttlInput {
451581
font-size: 0.7rem;
452582
color: #fcd34d;
453583
white-space: pre-wrap;
454-
display: block; /* ensures pre doesn't collapse in flex context */
455-
min-height: 2rem; /* guarantees it never collapses to zero */
584+
display: block;
585+
min-height: 2rem;
456586
max-height: 150px;
457587
overflow-y: auto;
458588
margin: 0;
@@ -938,6 +1068,15 @@ textarea:focus-visible {
9381068
font-size: 11px;
9391069
padding: 10px 15px;
9401070
}
1071+
1072+
/* Nested forms on mobile */
1073+
.nested-form {
1074+
padding: 8px;
1075+
}
1076+
1077+
.date-type-select {
1078+
flex: 0 0 100px;
1079+
}
9411080
}
9421081

9431082
@media (max-width: 480px) {
@@ -1027,4 +1166,3 @@ textarea::-webkit-scrollbar-thumb:hover {
10271166
.project-summary-mini a:hover {
10281167
color: var(--accent);
10291168
}
1030-
/* updated Tue Mar 3 20:38:33 EST 2026 */

0 commit comments

Comments
 (0)