Icons (v2.3)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 13:43:39 +01:00
parent f4471739e2
commit 406e9fed3a
5 changed files with 73 additions and 4 deletions

View File

@ -146,6 +146,12 @@
@media (prefers-reduced-motion: reduce) { .spinner, .skeleton i { animation: none; } }
.state { border: 1px dashed var(--border-field); border-radius: var(--radius-card); padding: 1.2rem; text-align: center; color: var(--muted); display: grid; gap: .6rem; justify-items: center; }
.state strong { color: var(--text); }
.icon { width: var(--icon-md); height: var(--icon-md); fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.3em; }
.icon.sm { width: var(--icon-sm); height: var(--icon-sm); } .icon.lg { width: var(--icon-lg); height: var(--icon-lg); }
.iconbtn { display: inline-grid; place-items: center; width: var(--icon-button); height: var(--icon-button); padding: 0; border: 1px solid var(--border-field); border-radius: var(--radius-button); background: var(--surface-2); color: var(--text); cursor: pointer; transition: border-color var(--transition); }
.iconbtn:hover { border-color: var(--accent-strong); }
.btn .icon { margin-right: .45rem; }
.statusrow { display: flex; align-items: center; gap: .5rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button { font: inherit; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 6px 12px; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent-strong); font-weight: 600; }
@ -190,6 +196,17 @@
</style>
</head>
<body>
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12.5l4.5 4.5L19 7.5"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6"/><path d="M20 20l-4.2-4.2"/></symbol>
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16M10 11v6M14 11v6M6 7l1 12h10l1-12M9 7V4h6v3"/></symbol>
<symbol id="i-warn" viewBox="0 0 24 24"><path d="M12 4l9 16H3zM12 10v4M12 17.5v.01"/></symbol>
<symbol id="i-err" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M9 9l6 6M15 9l-6 6"/></symbol>
<symbol id="i-info" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8v.01"/></symbol>
<symbol id="i-ok" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/></symbol>
</svg>
<header class="bar">
<div class="in">
<span class="wordmark">Style<b>guide</b> · Referenz</span>
@ -243,6 +260,32 @@
</div>
</section>
<section class="card">
<h2>Icons</h2>
<div class="row">
<svg class="icon sm" aria-hidden="true"><use href="#i-search"/></svg>
<svg class="icon" aria-hidden="true"><use href="#i-search"/></svg>
<svg class="icon lg" aria-hidden="true"><use href="#i-search"/></svg>
<small>1 rem · 1,25 rem · 1,5 rem</small>
</div>
<h3>Mit Text</h3>
<div class="row">
<button class="btn primary" type="button"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg>Neu anlegen</button>
<button class="btn danger" type="button"><svg class="icon" aria-hidden="true"><use href="#i-trash"/></svg>Löschen</button>
</div>
<h3>Nur Icon (mit zugänglichem Namen)</h3>
<div class="row">
<button class="iconbtn" type="button" aria-label="Suchen" title="Suchen"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg></button>
<button class="iconbtn" type="button" aria-label="Hinzufügen" title="Hinzufügen"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg></button>
<button class="iconbtn" type="button" aria-label="Schließen" title="Schließen"><svg class="icon" aria-hidden="true"><use href="#i-x"/></svg></button>
</div>
<h3>Zustände: Icon plus Text</h3>
<div class="statusrow" style="color:var(--ok)"><svg class="icon" aria-hidden="true"><use href="#i-ok"/></svg><span>Erfolg: Gespeichert</span></div>
<div class="statusrow" style="color:var(--warn)"><svg class="icon" aria-hidden="true"><use href="#i-warn"/></svg><span>Warnung: Verbindung langsam</span></div>
<div class="statusrow" style="color:var(--danger)"><svg class="icon" aria-hidden="true"><use href="#i-err"/></svg><span>Fehler: Nicht gespeichert</span></div>
<div class="statusrow" style="color:var(--info)"><svg class="icon" aria-hidden="true"><use href="#i-info"/></svg><span>Info: 12 Einträge</span></div>
</section>
<section class="card">
<h2>Lade-, Leer- und Fehlerzustände</h2>
<div class="grid" style="grid-template-columns:repeat(auto-fit,minmax(14rem,1fr))">