Move D-D0b rule inspector to full preview
This commit is contained in:
1 parent
1f561321f7
commit
e98d38e716
4 files changed
+274
-340
No files matched your search
@@ -86,6 +86,11 @@
|
||||
--preview-editor-pad: 32px;
|
||||
}
|
||||
|
||||
.preview-page:has(#rule-hints:not(:checked)) .rule-badge,
|
||||
.preview-page:has(#rule-hints:not(:checked)) .rule-callout {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.preview-config {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
@@ -260,6 +265,183 @@
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.preview-values > summary.preview-values-head {
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.preview-values > summary.preview-values-head::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.preview-values > summary.preview-values-head::after {
|
||||
content: "Auf/zu";
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.preview-values:not([open]) {
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.preview-values:not([open]) .value-set {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.rule-scope {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rule-badge {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
width: max-content;
|
||||
min-height: 24px;
|
||||
padding: 0 8px;
|
||||
border: 1px solid #b8c7ff;
|
||||
border-radius: 999px;
|
||||
background: #eef3ff;
|
||||
color: #2443a8;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.rule-badge::before {
|
||||
content: "->";
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.rule-badge::after {
|
||||
content: attr(data-tooltip);
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: calc(100% + 8px);
|
||||
z-index: 40;
|
||||
display: none;
|
||||
width: min(300px, 72vw);
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-shadow: 0 12px 32px -8px rgb(15 23 42 / 0.22);
|
||||
color: var(--text);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 1.45;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.rule-badge:hover::after,
|
||||
.rule-badge:focus-visible::after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.rule-anchor {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.preview-page-content > .rule-anchor {
|
||||
top: var(--preview-page-pad);
|
||||
right: var(--preview-page-pad);
|
||||
}
|
||||
|
||||
.rule-callout {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid #c7d2fe;
|
||||
border-radius: 8px;
|
||||
background: #f7f9ff;
|
||||
color: #294268;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.standards-drawer {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
z-index: 30;
|
||||
width: min(420px, calc(100vw - 40px));
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-shadow: 0 16px 40px -14px rgb(15 23 42 / 0.3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.standards-drawer summary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
cursor: pointer;
|
||||
font-weight: 800;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.standards-drawer summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.standards-drawer summary::after {
|
||||
content: "Auf/zu";
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.standards-drawer-body {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
max-height: min(520px, calc(100vh - 120px));
|
||||
padding: 0 16px 16px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.standards-drawer-note {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.standards-rule-list {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.standards-rule {
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
background: var(--surface-subtle);
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.standards-rule strong {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.standards-rule span {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.app-preview {
|
||||
display: grid;
|
||||
grid-template-columns: var(--preview-shell-sidebar) minmax(0, 1fr);
|
||||
@@ -596,6 +778,12 @@
|
||||
.preview-config-head {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.standards-drawer {
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
width: calc(100vw - 24px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -642,13 +830,21 @@
|
||||
Dialog 32px
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="control-group">
|
||||
<legend>Hilfen</legend>
|
||||
<label class="segmented-option">
|
||||
<input id="rule-hints" type="checkbox" checked />
|
||||
Rule Hints
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="preview-values">
|
||||
<div class="preview-values-head">
|
||||
<details class="preview-values">
|
||||
<summary class="preview-values-head">
|
||||
<strong>Aktive Layout-Daten</strong>
|
||||
<span class="small">Diese Werte aendern sich durch die Umschalter.</span>
|
||||
</div>
|
||||
</summary>
|
||||
|
||||
<div class="value-set values-shell-on">
|
||||
<div class="value-cell"><span>Shell</span><strong>An</strong></div>
|
||||
@@ -689,11 +885,60 @@
|
||||
<div class="value-cell"><span>Grid/Card Gap</span><strong>16px</strong></div>
|
||||
<div class="value-cell"><span>Dialog Padding</span><strong>32px Variante</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<details class="standards-drawer">
|
||||
<summary>Layout-Standards</summary>
|
||||
<div class="standards-drawer-body">
|
||||
<p class="standards-drawer-note">
|
||||
Klick springt zur Regel auf der D-D0b-Entscheidungsseite. Die Badges
|
||||
in der Preview zeigen, wo die Regel im Beispiel angewendet wird.
|
||||
</p>
|
||||
<div class="standards-rule-list">
|
||||
<a class="standards-rule" href="index.html#d01">
|
||||
<strong>D01 Grundraster</strong>
|
||||
<span>Erlaubte Werte: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d02">
|
||||
<strong>D02 Page/Card/Grid</strong>
|
||||
<span>Page 24px, Card/Surface 16px, Grid Gap 16px, kompakt lokal 12px.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d03">
|
||||
<strong>D03 Text-Rhythmus</strong>
|
||||
<span>0px / 24px / 0px / 12px mit 150%-Texttokens fuer Beschreibungen.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d04">
|
||||
<strong>D04 Button Ownership</strong>
|
||||
<span>Button Default/Medium/36px; Button-Padding kommt aus der Komponente.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d05">
|
||||
<strong>D05 Forms</strong>
|
||||
<span>Komplette Field-Komponenten stehen standardmaessig 16px auseinander.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d06">
|
||||
<strong>D06 Table Ownership</strong>
|
||||
<span>Tabellen-Dichte kommt aus der Table-Komponente; Carbon nur als Referenz.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d07">
|
||||
<strong>D07 Dialog Sizes</strong>
|
||||
<span>XS 420, S 560, M 720, L 1200; Fullscreen max 2512px.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d08">
|
||||
<strong>D08 Dialog Internal Gaps</strong>
|
||||
<span>Title 8px, Field 16px, Section 24px, Footer Button 8px.</span>
|
||||
</a>
|
||||
<a class="standards-rule" href="index.html#d09">
|
||||
<strong>D09 States</strong>
|
||||
<span>Empty/Error/No-Permission sind inline Komponenten-Zustaende, keine Modale.</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<div class="app-preview">
|
||||
<aside class="preview-sidebar">
|
||||
<aside class="preview-sidebar rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d02" data-tooltip="Die App-Shell bleibt als Kontext sichtbar; die eigentlichen Page-Abstaende starten rechts im Content-Bereich.">Shell Kontext</a>
|
||||
<div class="workspace-switcher">
|
||||
<div class="workspace-mark">HG</div>
|
||||
<div class="workspace-copy">
|
||||
@@ -721,8 +966,10 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="preview-page-content">
|
||||
<div class="preview-page-head">
|
||||
<main class="preview-page-content rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d02" data-tooltip="D02: Der Content nutzt mindestens 24px Page Padding. Der Wert bleibt auch in kompakten Settings gleich.">D02 Page Padding</a>
|
||||
<div class="preview-page-head rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d03" data-tooltip="D03: Page Title und Beschreibung stehen ohne extra Gap zusammen; der Abstand zum ersten Content bleibt stabil.">D03 Text-Rhythmus</a>
|
||||
<div>
|
||||
<p class="eyebrow">Workspace overview</p>
|
||||
<h2>Operations dashboard</h2>
|
||||
@@ -732,13 +979,16 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="preview-page-actions">
|
||||
<a class="rule-badge" href="index.html#d04" data-tooltip="D04: Button-Hoehe und Innenpadding kommen aus der Button-Komponente. Standardaktionen nutzen Default/Medium.">D04 Buttons</a>
|
||||
<span class="button secondary">Filter</span>
|
||||
<span class="button">Create task</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="preview-stat-grid">
|
||||
<div class="preview-card">
|
||||
<div class="preview-stat-grid rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d02" data-tooltip="D02: Grid/Card Gap ist standardmaessig 16px und kann nur in kompakten Teilbereichen auf 12px reduziert werden.">D02 Grid Gap</a>
|
||||
<div class="preview-card rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d02" data-tooltip="D02: Card/Surface Padding bleibt 16px; es wird nicht pro Screen neu erfunden.">D02 Card Padding</a>
|
||||
<p class="small">Open leads</p>
|
||||
<div class="stat-value">128</div>
|
||||
<p class="preview-meta">+12 this week</p>
|
||||
@@ -761,7 +1011,8 @@
|
||||
</div>
|
||||
|
||||
<div class="preview-workspace-grid">
|
||||
<section class="preview-card">
|
||||
<section class="preview-card rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d02" data-tooltip="D02: Auch groessere Inhaltskarten nutzen 16px Innenpadding und den globalen Grid Gap.">D02 Card</a>
|
||||
<h3>Recent work</h3>
|
||||
<p class="preview-meta">Tasks, customers and approvals in one dense page area.</p>
|
||||
<div class="preview-list">
|
||||
@@ -789,7 +1040,8 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<aside class="preview-card">
|
||||
<aside class="preview-card rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d09" data-tooltip="D09: Empty/Error/No-Permission waeren inline States in genau diesem Inhaltsbereich, nicht automatisch ein Modal.">D09 States</a>
|
||||
<h3>Workspace health</h3>
|
||||
<p class="preview-meta">
|
||||
Kompakte Settings- und Statusflaeche mit denselben
|
||||
@@ -803,7 +1055,8 @@
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<section class="preview-card">
|
||||
<section class="preview-card rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d06" data-tooltip="D06: Tabellen-Dichte, Row Height und Zellpadding kommen aus der Table-Komponente.">D06 Table</a>
|
||||
<div class="preview-page-head">
|
||||
<div>
|
||||
<h3>Employee access</h3>
|
||||
@@ -852,7 +1105,8 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="preview-card preview-editor-card">
|
||||
<section class="preview-card preview-editor-card rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d07" data-tooltip="D07/D08: Diese Flaeche simuliert die groessere Dialog-Variante. 32px kommt aus der Dialog-Komponente, nicht aus frei gesetztem Screen-Padding.">D07/D08 Dialog</a>
|
||||
<h3>Dialog 32px Variante</h3>
|
||||
<p class="preview-meta">
|
||||
Dieser Modus macht nur diese grosse Arbeitsflaeche innen
|
||||
@@ -866,7 +1120,8 @@
|
||||
<span>Projects</span>
|
||||
<span>Reports</span>
|
||||
</div>
|
||||
<div class="form">
|
||||
<div class="form rule-scope">
|
||||
<a class="rule-badge rule-anchor" href="index.html#d05" data-tooltip="D05: Komplette Field-Komponenten stehen 16px auseinander; Label/Help/Error gehoeren in die Komponente.">D05 Field Gap</a>
|
||||
<div class="field">
|
||||
<label>Role name</label>
|
||||
<input value="Operations Lead" />
|
||||
|
||||
Reference in new issue
Block a user