Dead code removed: - 05-utilities: grid-2/card-grid/stats block (superseded by 08-layout) - 02-semantic: dialog min-width:100% (conflicted with 03-components) - 02-semantic: hgroup p dead font-family, redundant nested list margin - All layers: [ai-disclosure] → [data-ai-disclosure] (bug fix) - table.striped → [data-table="striped"] (classless alignment) Ref cleanup: 12 --gray-N/--green-N/--blue-N replaced with semantic tokens. 24 refs marked TODO (syntax highlighting needs --syntax-* aliases).
681 lines
22 KiB
CSS
681 lines
22 KiB
CSS
/**
|
||
* 04-data-attrs.css
|
||
* Agentic extensions: data-attribute selectors for vault concepts
|
||
* Part of: Agentic Semantic Web
|
||
*/
|
||
|
||
@layer data-attrs {
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Vault-specific role patterns
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
/* Command box for install instructions */
|
||
[data-role="command-box"] {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
background: var(--surface-1);
|
||
border: var(--border-width) solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
padding: var(--space-3) var(--space-4);
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
margin: var(--space-5) 0;
|
||
}
|
||
|
||
[data-role="command-box"] .prefix {
|
||
color: var(--text-3);
|
||
margin-right: var(--space-2);
|
||
user-select: none;
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Wikilinks — [[Note Name]]
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-wikilink] {
|
||
color: var(--accent-blue);
|
||
font-family: var(--font-mono);
|
||
font-size: 0.9em;
|
||
text-decoration: none;
|
||
border-bottom: var(--border-width) dotted var(--border);
|
||
transition: border-color var(--ease);
|
||
}
|
||
|
||
[data-wikilink]:hover {
|
||
border-bottom-color: var(--accent-blue);
|
||
}
|
||
|
||
[data-wikilink][data-unresolved] {
|
||
color: var(--text-dim);
|
||
border-bottom-color: var(--text-dim);
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Tasks — - [ ] todo / - [x] done / - [?] blocked
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-task] {
|
||
display: block;
|
||
padding: 0.4em 0;
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
}
|
||
|
||
[data-task]::before {
|
||
margin-right: 0.75em;
|
||
font-weight: 700;
|
||
}
|
||
|
||
[data-task="todo"]::before {
|
||
content: "○";
|
||
color: var(--accent-orange);
|
||
}
|
||
|
||
[data-task="done"]::before {
|
||
content: "●";
|
||
color: var(--accent);
|
||
}
|
||
|
||
[data-task="blocked"]::before {
|
||
content: "◐";
|
||
color: var(--accent-red);
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Status indicators — awake / sleeping / blocked / unknown
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-status] {
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
}
|
||
|
||
[data-status="awake"] {
|
||
color: var(--accent);
|
||
}
|
||
|
||
[data-status="sleeping"] {
|
||
color: var(--text-3);
|
||
font-style: italic;
|
||
}
|
||
|
||
[data-status="blocked"] {
|
||
color: var(--accent-red);
|
||
}
|
||
|
||
[data-status="unknown"] {
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Callouts — note / warning / error / tip
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-callout] {
|
||
margin: 1.5em 0;
|
||
padding: 1em 1.25em;
|
||
border-left: 3px solid var(--accent-blue);
|
||
background: var(--surface-card);
|
||
border-radius: 0 var(--radius-md) var(--radius-md) 0;
|
||
}
|
||
|
||
[data-callout="warning"] { border-left-color: var(--accent-orange); }
|
||
[data-callout="error"] { border-left-color: var(--accent-red); }
|
||
[data-callout="tip"] { border-left-color: var(--accent); }
|
||
|
||
[data-callout-title] {
|
||
font-family: var(--font-mono);
|
||
font-weight: 500;
|
||
font-size: var(--text-sm);
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.05em;
|
||
color: var(--text);
|
||
margin-bottom: 0.5em;
|
||
display: block;
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Session metadata — mode / timestamp / hash
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-session] {
|
||
display: block;
|
||
padding: 0.75em 1em;
|
||
margin: 1em 0;
|
||
background: var(--surface-card);
|
||
border: 1px solid var(--border);
|
||
border-left: 3px solid var(--accent);
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
}
|
||
|
||
[data-mode="autonomous"] { color: var(--accent-blue); }
|
||
[data-mode="interactive"] { color: var(--accent); }
|
||
|
||
[data-session-meta] {
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
color: var(--text-3);
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Tags and hashes
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-tag] {
|
||
color: var(--accent-blue);
|
||
font-family: var(--font-mono);
|
||
font-size: 0.85em;
|
||
text-decoration: none;
|
||
}
|
||
|
||
[data-tag]::before { content: "#"; }
|
||
[data-tag]:hover { color: var(--text); }
|
||
|
||
[data-hash] {
|
||
font-family: var(--font-mono);
|
||
color: var(--text-3);
|
||
font-size: var(--text-sm);
|
||
letter-spacing: -0.02em;
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Semantic roles — timeline / status-card / diff
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-role="timeline"] {
|
||
border-left: var(--border-width) solid var(--border);
|
||
padding-left: 1.5em;
|
||
margin: 1.5em 0;
|
||
}
|
||
|
||
[data-role="timeline"] > * {
|
||
position: relative;
|
||
margin-bottom: 1.5em;
|
||
}
|
||
|
||
[data-role="timeline"] > *::before {
|
||
content: "●";
|
||
position: absolute;
|
||
left: -1.85em;
|
||
color: var(--accent);
|
||
font-size: 0.7em;
|
||
}
|
||
|
||
[data-role="status-card"] {
|
||
padding: 1.25em;
|
||
background: var(--surface-card);
|
||
border: var(--border-width) solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
margin: 1em 0;
|
||
}
|
||
|
||
[data-role="diff"] {
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
padding: 0.75em 1em;
|
||
background: var(--surface-1);
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
overflow-x: auto;
|
||
}
|
||
|
||
[data-role="diff"] .add { color: var(--accent); }
|
||
[data-role="diff"] .remove { color: var(--accent-red); }
|
||
[data-role="diff"] .context { color: var(--text-dim); }
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Tooltips — hover/focus-visible, accessible
|
||
Usage: <span data-tooltip="Explanation text">term</span>
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-tooltip] {
|
||
position: relative;
|
||
cursor: help;
|
||
border-bottom: var(--border-width) dotted var(--text-dim);
|
||
}
|
||
|
||
[data-tooltip]::after {
|
||
content: attr(data-tooltip);
|
||
position: absolute;
|
||
bottom: calc(100% + 0.5rem);
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
padding: 0.4rem 0.75rem;
|
||
background: var(--surface-1);
|
||
color: var(--text);
|
||
border: var(--border-width) solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-xs);
|
||
line-height: 1.4;
|
||
white-space: nowrap;
|
||
max-width: var(--tooltip-max-width);
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
pointer-events: none;
|
||
opacity: 0;
|
||
transition: opacity var(--ease);
|
||
z-index: 10;
|
||
}
|
||
|
||
/* Arrow */
|
||
[data-tooltip]::before {
|
||
content: "";
|
||
position: absolute;
|
||
bottom: calc(100% + 0.15rem);
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
border: 0.35rem solid transparent;
|
||
border-top-color: var(--border);
|
||
pointer-events: none;
|
||
opacity: 0;
|
||
transition: opacity var(--ease);
|
||
z-index: 10;
|
||
}
|
||
|
||
[data-tooltip]:hover::after,
|
||
[data-tooltip]:hover::before,
|
||
[data-tooltip]:focus-visible::after,
|
||
[data-tooltip]:focus-visible::before {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* Bottom placement */
|
||
[data-tooltip-position="bottom"]::after {
|
||
bottom: auto;
|
||
top: calc(100% + 0.5rem);
|
||
}
|
||
|
||
[data-tooltip-position="bottom"]::before {
|
||
bottom: auto;
|
||
top: calc(100% + 0.15rem);
|
||
border-top-color: transparent;
|
||
border-bottom-color: var(--border);
|
||
}
|
||
|
||
/* Generator utility roles */
|
||
[data-role="log-entry"] {
|
||
padding: 0.3rem 0;
|
||
border-bottom: 1px solid var(--border-subtle);
|
||
}
|
||
|
||
[data-role="list-item"] {
|
||
padding: 0.1rem 0;
|
||
}
|
||
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
Sub-navigation — section nav within a page group
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
/* Usage:
|
||
<nav data-subnav>
|
||
<a href="/vigilio/" aria-current="page">index</a>
|
||
<a href="/vigilio/now">now</a>
|
||
<a href="/vigilio/status">status</a>
|
||
</nav>
|
||
|
||
Place inside <main class="container"> before article content.
|
||
aria-current="page" marks the active section. No classes needed. */
|
||
|
||
[data-subnav] {
|
||
display: flex;
|
||
align-items: center;
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
margin-bottom: var(--space-6);
|
||
padding-bottom: var(--space-3);
|
||
border-bottom: var(--border-width) solid var(--border);
|
||
}
|
||
|
||
[data-subnav] a {
|
||
color: var(--text-dim);
|
||
text-decoration: none;
|
||
transition: color var(--ease);
|
||
}
|
||
|
||
[data-subnav] a + a::before {
|
||
content: "/";
|
||
color: var(--border);
|
||
margin: 0 0.6rem;
|
||
}
|
||
|
||
[data-subnav] a:hover {
|
||
color: var(--text);
|
||
}
|
||
|
||
[data-subnav] a[aria-current="page"] {
|
||
color: var(--text);
|
||
}
|
||
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
data-diff — CSS diff viewer for code review and comparison output
|
||
Issue: agentic-semantic-web#52
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-diff] {
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-sm);
|
||
background: var(--surface-1);
|
||
border: var(--border-width) solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
overflow-x: auto;
|
||
margin: var(--space-5) 0;
|
||
padding: 0;
|
||
}
|
||
|
||
/* File header */
|
||
[data-diff-file] {
|
||
display: block;
|
||
background: var(--surface-card);
|
||
border-bottom: 1px solid var(--border);
|
||
padding: 0.4em 1em;
|
||
font-size: var(--text-xs);
|
||
color: var(--text-3);
|
||
letter-spacing: 0.02em;
|
||
}
|
||
|
||
/* Individual diff lines */
|
||
[data-diff-line] {
|
||
display: block;
|
||
padding: 0.15em 1em 0.15em 3em;
|
||
position: relative;
|
||
line-height: 1.6;
|
||
white-space: pre;
|
||
}
|
||
|
||
/* Prefix gutter marker */
|
||
[data-diff-line]::before {
|
||
position: absolute;
|
||
left: 1em;
|
||
width: 1.5em;
|
||
text-align: center;
|
||
}
|
||
|
||
[data-diff-line="added"] {
|
||
background: var(--diff-add-bg);
|
||
color: var(--green-3); /* TODO: map to semantic token — no alias for green-3 (--accent-hover=green-4 is one step darker) */
|
||
}
|
||
|
||
[data-diff-line="added"]::before {
|
||
content: "+";
|
||
color: var(--ok); /* --ok = var(--green-5) */
|
||
}
|
||
|
||
[data-diff-line="removed"] {
|
||
background: var(--diff-remove-bg);
|
||
color: var(--diff-remove-text);
|
||
}
|
||
|
||
[data-diff-line="removed"]::before {
|
||
content: "−";
|
||
color: var(--red-6); /* TODO: map to semantic token — no alias for red-6 (--error=red-7, --callout-error=red-5) */
|
||
}
|
||
|
||
[data-diff-line="context"] {
|
||
color: var(--text-3);
|
||
}
|
||
|
||
[data-diff-line="context"]::before {
|
||
content: " ";
|
||
}
|
||
|
||
/* Hunk header — @@ line markers */
|
||
[data-diff-line="hunk"] {
|
||
background: var(--diff-hunk-bg);
|
||
color: var(--accent-blue);
|
||
font-style: italic;
|
||
}
|
||
|
||
[data-diff-line="hunk"]::before {
|
||
content: "@@";
|
||
font-style: normal;
|
||
color: var(--accent-blue);
|
||
opacity: 0.6;
|
||
}
|
||
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
data-redacted — privacy-aware redaction styling
|
||
Issue: agentic-semantic-web#55
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
/* Base: fully redacted — black bar, not selectable */
|
||
[data-redacted] {
|
||
background: var(--text);
|
||
color: transparent;
|
||
border-radius: var(--radius-sm);
|
||
user-select: none;
|
||
/* Screen reader replacement handled via aria-label on element */
|
||
}
|
||
|
||
/* Block-level redaction */
|
||
[data-redacted]:is(p, div, section, article, li) {
|
||
display: block;
|
||
min-height: 1.2em;
|
||
}
|
||
|
||
/* Variant: reveal on hover/focus */
|
||
[data-redacted="reveal"] {
|
||
cursor: pointer;
|
||
transition: background var(--ease), color var(--ease);
|
||
}
|
||
|
||
[data-redacted="reveal"]:hover,
|
||
[data-redacted="reveal"]:focus {
|
||
background: var(--surface-card);
|
||
color: var(--text);
|
||
outline: var(--border-width) solid var(--border);
|
||
border-radius: var(--radius-sm);
|
||
user-select: text;
|
||
}
|
||
|
||
/* Variant: label — shows [REDACTED] text */
|
||
[data-redacted="label"] {
|
||
background: var(--surface-1);
|
||
color: var(--text-dim);
|
||
font-family: var(--font-mono);
|
||
font-size: 0.85em;
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-sm);
|
||
padding: 0 0.35em;
|
||
user-select: none;
|
||
}
|
||
|
||
[data-redacted="label"]::before {
|
||
content: "[REDACTED]";
|
||
}
|
||
|
||
[data-redacted="label"] > * {
|
||
display: none;
|
||
}
|
||
|
||
/* Light mode adjustments */
|
||
@media (prefers-color-scheme: light) {
|
||
[data-redacted] {
|
||
background: var(--gray-15); /* TODO: map to semantic token — no alias for absolute black; needed for redaction bar in light mode */
|
||
}
|
||
[data-redacted="reveal"]:hover,
|
||
[data-redacted="reveal"]:focus {
|
||
background: var(--surface-1); /* light mode: --surface-1 = var(--gray-1) */
|
||
color: var(--gray-15); /* TODO: map to semantic token — no alias for absolute black text in light mode */
|
||
}
|
||
}
|
||
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
data-reading-progress — CSS-only scroll progress bar
|
||
Issue: agentic-semantic-web#53
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
@keyframes asw-reading-progress {
|
||
from { width: 0%; }
|
||
to { width: 100%; }
|
||
}
|
||
|
||
[data-reading-progress]::before {
|
||
content: "";
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
height: var(--border-size-2);
|
||
background: var(--accent);
|
||
z-index: 9999;
|
||
/* Subtle shadow so bar is visible on light pages too */
|
||
box-shadow: 0 0 6px var(--accent-focus);
|
||
}
|
||
|
||
/* animation-timeline: scroll() — fills as the page scrolls.
|
||
Guarded: skip for users who prefer reduced motion. */
|
||
@media (--motionOK) {
|
||
[data-reading-progress]::before {
|
||
animation: asw-reading-progress auto linear;
|
||
animation-timeline: scroll(root);
|
||
}
|
||
}
|
||
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
ai-disclosure — styling for AI content disclosure attributes
|
||
Issue: agentic-semantic-web#58
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
/* Subtle accent on AI-generated sections — light left border indicator */
|
||
[data-ai-disclosure] {
|
||
border-left: var(--border-size-2) solid transparent;
|
||
padding-left: var(--space-3);
|
||
}
|
||
|
||
[data-ai-disclosure="ai-generated"] {
|
||
border-left-color: var(--ai-generated-border);
|
||
}
|
||
|
||
[data-ai-disclosure="ai-assisted"] {
|
||
border-left-color: var(--ai-assisted-border);
|
||
}
|
||
|
||
/* Autonomous — more distinct: full accent treatment */
|
||
[data-ai-disclosure="autonomous"] {
|
||
border-left-color: var(--accent);
|
||
border-left-width: var(--border-size-2);
|
||
}
|
||
|
||
/* Mixed — yellow/amber to signal blended provenance */
|
||
[data-ai-disclosure="mixed"] {
|
||
border-left-color: var(--ai-mixed-border);
|
||
}
|
||
|
||
/* Disclosure badge — optional ::after label for verbose mode */
|
||
[data-ai-disclosure][data-show-disclosure]::after {
|
||
content: " [" attr(data-ai-disclosure) "]";
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-xs);
|
||
color: var(--text-dim);
|
||
vertical-align: super;
|
||
font-size: 0.65em;
|
||
}
|
||
|
||
/* ── CTA buttons: data-role on <a> ─────────────────────────────────────── */
|
||
/* Agents write <a href="..."> naturally. data-role styles intent without class names. */
|
||
a[data-role="primary"] {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
padding: var(--space-2) var(--space-5);
|
||
background: var(--accent);
|
||
color: var(--on-accent);
|
||
border-radius: var(--radius-md);
|
||
font-weight: 500;
|
||
text-decoration: none;
|
||
transition: background var(--duration-quick-2) var(--ease-1);
|
||
}
|
||
|
||
a[data-role="primary"]:hover {
|
||
background: var(--accent-hover);
|
||
color: var(--on-accent);
|
||
text-decoration: none;
|
||
}
|
||
|
||
a[data-role="secondary"] {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
padding: var(--space-2) var(--space-5);
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
color: var(--text-2);
|
||
text-decoration: none;
|
||
transition: border-color var(--duration-quick-2) var(--ease-1), color var(--duration-quick-2) var(--ease-1);
|
||
}
|
||
|
||
a[data-role="secondary"]:hover {
|
||
border-color: var(--accent);
|
||
color: var(--text);
|
||
text-decoration: none;
|
||
}
|
||
|
||
/* ── Badge atom ────────────────────────────────────────────────────────────── */
|
||
/* Icon badge / token pill. <span data-badge>token</span>. */
|
||
[data-badge] {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--surface-2);
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-md);
|
||
padding: var(--space-2) var(--space-3);
|
||
font-family: var(--font-mono);
|
||
font-size: var(--text-xs);
|
||
color: var(--accent);
|
||
margin-bottom: var(--space-3);
|
||
}
|
||
|
||
/* ══════════════════════════════════════════════════════════════════════════
|
||
data-size — universal size modifier axis
|
||
Issue: lineage-ingestion / Semantic UI modifier grammar
|
||
|
||
Scales font-size, padding, and gap on any component.
|
||
Inherit-safe: child elements scale relative to the component root.
|
||
|
||
Usage:
|
||
<span data-badge data-size="lg">token</span>
|
||
<div data-role="status-card" data-size="sm">…</div>
|
||
<a data-role="primary" data-size="xl">Big CTA</a>
|
||
|
||
Values: xs / sm / md (default, no-op) / lg / xl
|
||
══════════════════════════════════════════════════════════════════════════ */
|
||
|
||
[data-size="xs"] {
|
||
font-size: var(--font-size-00, 0.6rem);
|
||
padding: var(--size-1) var(--size-2);
|
||
gap: var(--size-1);
|
||
}
|
||
|
||
[data-size="sm"] {
|
||
font-size: var(--text-xs);
|
||
padding: var(--size-1) var(--size-3);
|
||
gap: var(--size-2);
|
||
}
|
||
|
||
/* md is the default — explicit reset for override contexts */
|
||
[data-size="md"] {
|
||
font-size: var(--text-base);
|
||
padding: var(--space-2) var(--space-4);
|
||
gap: var(--space-3);
|
||
}
|
||
|
||
[data-size="lg"] {
|
||
font-size: var(--text-2xl);
|
||
padding: var(--space-3) var(--space-5);
|
||
gap: var(--space-4);
|
||
}
|
||
|
||
[data-size="xl"] {
|
||
font-size: var(--text-3xl);
|
||
padding: var(--space-4) var(--space-5);
|
||
gap: var(--space-5);
|
||
}
|
||
|
||
} /* end @layer data-attrs */
|