_crdt-docs.scss
sha256:259e6968cab8c57d9cd790b248e033ceeab2d75a7bdb547e2e41ffb4316cd3cf
docs(crdt): #259 CRDT Primitives QA contract v2 — correct /…
Sonnet 5.5
minor
⚠ breaking
8 days ago
| 1 | // ── /muse/crdt (musehub#259) ────────────────────────────────────────────────────────────────────────────────── |
| 2 | // Page-owned styles for the lattice-law cards (V1) and the per-type method tables. The cards sit in the shared docs |
| 3 | // figure (.docfig, musehub#242 W7): server-rendered, complete without script, readable in DOM order, so each card is |
| 4 | // its own text alternative. No motion. Theme tokens only. A failing law is never carried by colour alone: its row has |
| 5 | // a heavier start border and says "NOT equal: the law fails here" in text. |
| 6 | // |
| 7 | // Accent, muted and syntax tokens never colour text here (below WCAG AA on the light theme, musehub#283): text stays |
| 8 | // 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, profiles and merge pages ─── |
| 11 | // Delete this block when #283 fixes the tokens. |
| 12 | .devdocs--crdt .devdocs-phase-num { color: var(--text-secondary); } |
| 13 | .devdocs--crdt .devdocs-phase-desc { color: var(--text-secondary); } |
| 14 | .devdocs--crdt .devdocs-phase-desc code { color: var(--text-primary); } |
| 15 | |
| 16 | .devdocs--crdt .devdocs-section :is(p, li, td, figcaption, dd, .devdocs-callout > div) a, |
| 17 | .devdocs--crdt .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--crdt .devdocs-section :is(p, li, td, dd) code, |
| 24 | .devdocs--crdt .devdocs-callout code { color: var(--text-primary); } |
| 25 | |
| 26 | .devdocs--crdt .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--crdt .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 | .devdocs--crdt .devdocs-code-header :is(.devdocs-code-lang, .devdocs-code-label) { color: var(--text-secondary); } |
| 46 | .devdocs--crdt .devdocs-code-block pre { color: var(--text-primary); } |
| 47 | |
| 48 | // Existing CRDT elements on the shared tokens (accent and muted text is below AA, 1.5 to 3.9:1). |
| 49 | .devdocs--crdt .crdt-law-symbol { color: var(--text-primary); } |
| 50 | .devdocs--crdt .crdt-law-formula { color: var(--text-primary); } |
| 51 | .devdocs--crdt .crdt-primitive-badge { color: var(--text-primary); border: 1px solid var(--border-default); background: var(--bg-surface); } |
| 52 | .devdocs--crdt .crdt-primitive-name { color: var(--text-primary); } |
| 53 | .devdocs--crdt .crdt-primitive-tagline, |
| 54 | .devdocs--crdt .crdt-primitive-use, |
| 55 | .devdocs--crdt .crdt-primitive-wire { color: var(--text-secondary); } |
| 56 | .devdocs--crdt .crdt-primitive-tagline code, |
| 57 | .devdocs--crdt .crdt-primitive-use code, |
| 58 | .devdocs--crdt .crdt-primitive-wire code { color: var(--text-primary); } |
| 59 | .devdocs--crdt .crdt-primitive-use strong { color: var(--text-primary); } |
| 60 | |
| 61 | // Long unbreakable tokens (signatures, JSON, IDs) must wrap inside callouts, cards and cells on a phone. |
| 62 | .devdocs--crdt :not(pre) > code { overflow-wrap: anywhere; } |
| 63 | .devdocs--crdt .devdocs-callout > div { min-width: 0; } |
| 64 | .devdocs--crdt .devdocs-callout ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); } |
| 65 | .devdocs--crdt .devdocs-callout li + li { margin-top: var(--space-2); } |
| 66 | .devdocs--crdt .devdocs-code-block pre { overflow-x: auto; } |
| 67 | // Shared tables: header text is below AA on the light theme (2.2:1). Phones get labelled blocks instead of a table |
| 68 | // that scrolls sideways (the shared .devdocs-table is display:block + overflow-x:auto). |
| 69 | .devdocs--crdt .devdocs-table { |
| 70 | th { color: var(--text-secondary); } |
| 71 | td, td code { color: var(--text-primary); } |
| 72 | td:first-child, td:nth-child(2) { white-space: normal; } |
| 73 | code { overflow-wrap: anywhere; } |
| 74 | } |
| 75 | @media (max-width: 640px) { |
| 76 | .devdocs--crdt .devdocs-table { |
| 77 | overflow: visible; |
| 78 | thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } |
| 79 | tbody, tr, td { display: block; width: auto; } |
| 80 | tr { border-bottom: 1px solid var(--border-default); padding: var(--space-1) 0; } |
| 81 | td { border-bottom: 0; padding: 2px 0; } |
| 82 | td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text-secondary); } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | // ── Per-type cards and method tables ───────────────────────────────────────────────────────────────────────── |
| 87 | .devdocs--crdt .crdt-primitives { grid-template-columns: minmax(0, 1fr); } |
| 88 | .devdocs--crdt .crdt-primitive { min-width: 0; } |
| 89 | |
| 90 | .crdt-methods { |
| 91 | width: 100%; |
| 92 | border-collapse: collapse; |
| 93 | margin: var(--space-3) 0; |
| 94 | font-size: 12px; |
| 95 | line-height: 1.5; |
| 96 | table-layout: fixed; |
| 97 | |
| 98 | th, td { |
| 99 | text-align: left; |
| 100 | vertical-align: top; |
| 101 | padding: 4px var(--space-2); |
| 102 | border-top: 1px solid var(--border-subtle); |
| 103 | overflow-wrap: anywhere; |
| 104 | } |
| 105 | thead th { color: var(--text-secondary); font-weight: 600; border-top: 0; } |
| 106 | tbody th { width: 28%; font-weight: 600; color: var(--text-primary); } |
| 107 | td { color: var(--text-primary); } |
| 108 | code { background: none; border: 0; padding: 0; font-family: var(--font-mono); } |
| 109 | } |
| 110 | .crdt-methods__caption { |
| 111 | text-align: left; |
| 112 | font-size: 12px; |
| 113 | color: var(--text-secondary); |
| 114 | padding-bottom: var(--space-1); |
| 115 | } |
| 116 | .crdt-primitive-wire { font-size: 12px; margin: var(--space-2) 0; } |
| 117 | |
| 118 | // ── Lattice-law cards (V1) ─────────────────────────────────────────────────────────────────────────────────── |
| 119 | .docfig .lawcards { |
| 120 | list-style: none; |
| 121 | margin: 0; |
| 122 | padding: 0; |
| 123 | display: grid; |
| 124 | grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); |
| 125 | gap: var(--space-3); |
| 126 | } |
| 127 | |
| 128 | .docfig .lawcard { |
| 129 | min-width: 0; |
| 130 | padding: var(--space-3); |
| 131 | border: 1px solid var(--border-default); |
| 132 | border-radius: 8px; |
| 133 | background: var(--bg-surface); |
| 134 | font-size: 12px; |
| 135 | line-height: 1.5; |
| 136 | color: var(--text-secondary); |
| 137 | |
| 138 | &--rga { border-left: 5px solid var(--color-accent); background: var(--bg-overlay); } |
| 139 | } |
| 140 | |
| 141 | .docfig .lawcard__title { margin: 0 0 var(--space-2); font-size: 14px; color: var(--text-primary); } |
| 142 | .docfig .lawcard__title code { background: none; border: 0; padding: 0; font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); } |
| 143 | |
| 144 | .docfig .lawcard__inputs { |
| 145 | margin: 0 0 var(--space-2); |
| 146 | display: grid; |
| 147 | gap: 2px; |
| 148 | |
| 149 | > div { display: flex; gap: var(--space-2); min-width: 0; } |
| 150 | dt { flex: none; font-family: var(--font-mono); font-weight: 700; color: var(--text-primary); } |
| 151 | dd { margin: 0; min-width: 0; } |
| 152 | code { background: none; border: 0; padding: 0; overflow-wrap: anywhere; font-family: var(--font-mono); color: var(--text-primary); } |
| 153 | } |
| 154 | |
| 155 | .docfig .lawcard__laws { |
| 156 | width: 100%; |
| 157 | border-collapse: collapse; |
| 158 | table-layout: fixed; |
| 159 | |
| 160 | th, td { text-align: left; vertical-align: top; padding: 4px var(--space-2); border-top: 1px solid var(--border-subtle); overflow-wrap: anywhere; } |
| 161 | thead th { color: var(--text-secondary); font-weight: 600; border-top: 0; } |
| 162 | tbody th { color: var(--text-primary); font-weight: 600; } |
| 163 | td, code { color: var(--text-primary); } |
| 164 | code { background: none; border: 0; padding: 0; font-family: var(--font-mono); } |
| 165 | } |
| 166 | .docfig .lawcard__expr { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--text-secondary); } |
| 167 | .docfig .lawcard__row--fails > :first-child { box-shadow: inset 5px 0 0 var(--color-accent); padding-left: var(--space-3); } |
| 168 | .docfig .lawcard__note { margin: var(--space-2) 0 0; color: var(--text-primary); } |
| 169 | |
| 170 | // Phones: a row becomes a labelled block, so no card scrolls sideways. |
| 171 | @media (max-width: 640px) { |
| 172 | .docfig .lawcard__laws { |
| 173 | thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } |
| 174 | tbody, tr, th, td { display: block; width: auto; } |
| 175 | tr { border-top: 1px solid var(--border-subtle); padding: var(--space-1) 0; } |
| 176 | th, td { border-top: 0; padding: 2px 0; } |
| 177 | td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--text-secondary); } |
| 178 | } |
| 179 | .crdt-methods { table-layout: auto; } |
| 180 | } |
| 181 | |
| 182 | @media (forced-colors: active) { |
| 183 | .docfig .lawcard { border: 1px solid CanvasText; } |
| 184 | .docfig .lawcard--rga { border-left-width: 5px; } |
| 185 | .docfig .lawcard__row--fails > :first-child { box-shadow: none; border-left: 5px solid CanvasText; } |
| 186 | } |
File History
1 commit
sha256:259e6968cab8c57d9cd790b248e033ceeab2d75a7bdb547e2e41ffb4316cd3cf
docs(crdt): #259 CRDT Primitives QA contract v2 — correct /…
Sonnet 5.5
minor
⚠
8 days ago