gabriel / musehub public
_security-docs.scss
155 lines 8.1 KB
Raw
sha256:7513f245748d6667481e0ecef54e261ad11d4a664ba7128527060b240f4707bc docs(security): #260 Security Reference QA contract v2 — co… Sonnet 5.5 minor ⚠ breaking 7 days ago
1 // ── /muse/security (musehub#260) ──────────────────────────────────────────────────────────────────────────────
2 // Page-owned styles for the trust-boundary map (V1), the threat and size-cap tables, and the guard cards' status. The
3 // map sits in the shared docs figure (.docfig, musehub#242 W7): server-rendered, complete without script, readable in
4 // DOM order, so it is its own text alternative. No motion. Theme tokens only. A guard that is not applied everywhere is
5 // never marked by colour alone: its row says "not applied" or "some paths" in text and has a dashed or heavier border.
6 //
7 // Accent, danger, warning, teal, purple and muted tokens never colour text here (below WCAG AA on the light theme,
8 // musehub#283): text stays on --text-primary / --text-secondary; the tokens only draw borders and fills.
9
10 // ── Interim contrast overrides (musehub#283), scoped to this page like the vision, crdt and profiles pages ───
11 // Delete this block when #283 fixes the tokens.
12 .devdocs--security .devdocs-phase-num { color: var(--text-secondary); }
13 .devdocs--security .devdocs-phase-desc { color: var(--text-secondary); }
14 .devdocs--security .devdocs-phase-desc code { color: var(--text-primary); }
15
16 .devdocs--security .devdocs-section :is(p, li, td, dd, figcaption, .sec-guard-sites, .sec-guard-limits) a,
17 .devdocs--security .devdocs-callout a {
18 color: var(--text-primary);
19 text-decoration: underline;
20 text-underline-offset: 2px;
21 &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
22 }
23 .devdocs--security .devdocs-section :is(p, li, td, dd) code,
24 .devdocs--security .devdocs-callout code { color: var(--text-primary); }
25
26 .devdocs--security .devdocs-breadcrumb {
27 color: var(--text-secondary);
28 span { color: var(--text-secondary); }
29 a {
30 color: var(--text-primary);
31 text-decoration: underline;
32 text-underline-offset: 2px;
33 &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
34 }
35 }
36 .devdocs--security .devdocs-nav {
37 .devdocs-nav-group-label,
38 .devdocs-nav-link--sub { color: var(--text-secondary); }
39 .devdocs-nav-link--active {
40 color: var(--text-primary);
41 font-weight: 600;
42 box-shadow: inset 2px 0 0 var(--color-accent);
43 }
44 }
45
46 .devdocs--security :not(pre) > code { overflow-wrap: anywhere; }
47 .devdocs--security .devdocs-callout > div { min-width: 0; }
48 .devdocs--security .devdocs-callout ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); }
49 .devdocs--security .devdocs-callout li + li { margin-top: var(--space-2); }
50 .devdocs--security .devdocs-callout p + p { margin-top: var(--space-2); }
51
52 // ── Threat and size-cap tables: labelled blocks on a phone, no sideways scrolling ───────────────────────────
53 .devdocs--security .sec-threat-table,
54 .devdocs--security .sec-caps-table {
55 display: table;
56 width: 100%;
57 table-layout: auto;
58 th { color: var(--text-secondary); }
59 td, td code { color: var(--text-primary); }
60 td:first-child { font-family: inherit; font-size: 13px; color: var(--text-primary); white-space: normal; }
61 td, th { overflow-wrap: anywhere; }
62 code { font-family: var(--font-mono); font-size: 12px; background: none; border: 0; padding: 0; }
63 .sec-threat-sev {
64 color: var(--text-primary);
65 background: var(--bg-overlay);
66 border: 1px solid var(--border-default);
67 }
68 .sec-threat-sev--critical { border-left: 5px solid var(--color-danger); }
69 .sec-threat-sev--high { border-left: 5px solid var(--color-warning); }
70 .sec-threat-sev--medium { border-left: 5px solid var(--color-teal); }
71 }
72 .devdocs--security .sec-threat-table tr[data-status="helper-only"] td:last-child,
73 .devdocs--security .sec-threat-table tr[data-status="partial"] td:last-child { font-weight: 600; }
74 .devdocs--security .sec-threat-note { display: block; margin-top: 2px; font-size: 12px; color: var(--text-secondary); }
75 .devdocs--security .sec-caps-table tr[data-works="no"] td:first-child { box-shadow: inset 5px 0 0 var(--color-accent); padding-left: var(--space-3); }
76
77 @media (max-width: 640px) {
78 .devdocs--security :is(.sec-threat-table, .sec-caps-table) {
79 thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
80 tbody, tr, td { display: block; width: auto; }
81 tr { border-bottom: 1px solid var(--border-default); padding: var(--space-1) 0; }
82 td { border-bottom: 0; padding: 2px 0; white-space: normal; }
83 td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text-secondary); }
84 }
85 }
86
87 // ── Guard cards ──────────────────────────────────────────────────────────────────────────────────────────────
88 .devdocs--security .sec-guards { grid-template-columns: minmax(0, 1fr); }
89 .devdocs--security .sec-guard { min-width: 0; }
90 .devdocs--security .sec-guard--helper-only { border-style: dashed; }
91 .devdocs--security .sec-guard--partial { border-left: 5px solid var(--color-accent); }
92 .devdocs--security .sec-guard-name { color: var(--text-primary); }
93 .devdocs--security .sec-guard-layer { color: var(--text-secondary); }
94 .devdocs--security .sec-guard-fn { color: var(--text-primary); overflow-wrap: anywhere; }
95 .devdocs--security .sec-guard-attack { color: var(--text-primary); }
96 .devdocs--security .sec-guard-sites { color: var(--text-secondary); code { color: var(--text-primary); } strong { color: var(--text-primary); } }
97 .devdocs--security .sec-guard-limits {
98 margin: var(--space-3) 0 0;
99 padding-top: var(--space-3);
100 border-top: 1px solid var(--border-subtle);
101 font-size: 12px;
102 line-height: 1.6;
103 color: var(--text-secondary);
104 strong { color: var(--text-primary); }
105 code { color: var(--text-primary); }
106 }
107
108 // ── Trust-boundary map (V1) ──────────────────────────────────────────────────────────────────────────────────
109 .docfig .tbmap {
110 list-style: none;
111 margin: 0;
112 padding: 0;
113 display: grid;
114 gap: var(--space-2);
115 }
116 .docfig .tbmap__row {
117 display: grid;
118 grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
119 gap: 0;
120 border: 1px solid var(--border-default);
121 border-radius: 8px;
122 background: var(--bg-surface);
123 font-size: 12px;
124 line-height: 1.5;
125 color: var(--text-primary);
126 overflow: hidden;
127
128 &--helper-only { border-style: dashed; }
129 &--partial { border-left: 5px solid var(--color-accent); }
130 }
131 .docfig .tbmap__cell {
132 min-width: 0;
133 padding: var(--space-2) var(--space-3);
134 overflow-wrap: anywhere;
135 & + & { border-left: 1px solid var(--border-subtle); }
136 code { background: none; border: 0; padding: 0; font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); }
137 }
138 .docfig .tbmap__cell--in { background: var(--bg-base); }
139 .docfig .tbmap__cell--guard { background: var(--bg-overlay); }
140 .docfig .tbmap__label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); }
141 .docfig .tbmap__applied { display: block; margin-top: 2px; color: var(--text-secondary); strong { color: var(--text-primary); } }
142 .docfig .tbmap a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 2px; &:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; } }
143
144 @media (max-width: 760px) {
145 .docfig .tbmap__row { grid-template-columns: minmax(0, 1fr); }
146 .docfig .tbmap__cell + .tbmap__cell { border-left: 0; border-top: 1px solid var(--border-subtle); }
147 }
148
149 @media (forced-colors: active) {
150 .docfig .tbmap__row { border: 1px solid CanvasText; }
151 .docfig .tbmap__row--helper-only { border-style: dashed; }
152 .docfig .tbmap__row--partial { border-left-width: 5px; }
153 .devdocs--security .sec-guard { border: 1px solid CanvasText; }
154 .devdocs--security .sec-guard--partial { border-left-width: 5px; }
155 }
File History 1 commit
sha256:7513f245748d6667481e0ecef54e261ad11d4a664ba7128527060b240f4707bc docs(security): #260 Security Reference QA contract v2 — co… Sonnet 5.5 minor ⚠ 7 days ago