openvibers/openvibe.shoes Commits
Phone table cards only for tables whose cells name their column (#20)
Changes
@@@ -116,17 +116,17 @@@keyframes shTag { from { opacity: 0; transform: translateX(24px); } }@media (prefers-reduced-motion: reduce) { .sh-shoe path, .sh-mt { animation: none; } }--/* Tables on a phone (phone sweep, 2026-11-01): a table of three columns or more shows each row as a card, the first++/* Tables on a phone (phone sweep, 2026-11-01): a table of three columns or more whose cells name their column (data-label) shows each row as a card, the firstcell its title and every other cell named by its column (html.js gives each cell its data-label). Narrower tablesstay tables. Nothing is left out and nothing scrolls sideways. */@media (max-width: 640px) {-- .table-wrap:has(> table thead th:nth-child(3)) { overflow: visible; }-- .table-wrap > table:has(thead th:nth-child(3)) { display: block; }-- .table-wrap > table:has(thead th:nth-child(3)) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }-- .table-wrap > table:has(thead th:nth-child(3)) tbody { display: grid; gap: 10px; }-- .table-wrap > table:has(thead th:nth-child(3)) tr { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border, #1f2d47); border-radius: 14px; background: var(--bg-card, var(--bg-secondary, #101828)); }-- .table-wrap > table:has(thead th:nth-child(3)) td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }-- .table-wrap > table:has(thead th:nth-child(3)) td:first-child { font-weight: 700; color: var(--text-primary, #e6edf7); }-- .table-wrap > table:has(thead th:nth-child(3)) td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #7386a3); }-- .table-wrap > table:has(thead th:nth-child(3)) td:empty { display: none; }++ .table-wrap:has(> table thead th:nth-child(3)):has(> table td[data-label]) { overflow: visible; }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) { display: block; }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) tbody { display: grid; gap: 10px; }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) tr { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border, #1f2d47); border-radius: 14px; background: var(--bg-card, var(--bg-secondary, #101828)); }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td:first-child { font-weight: 700; color: var(--text-primary, #e6edf7); }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #7386a3); }++ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td:empty { display: none; }}
@@ -116,17 +116,17 @@
@@ -116,17 +116,17 @@
@keyframes shTag { from { opacity: 0; transform: translateX(24px); } }
@keyframes shTag { from { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .sh-shoe path, .sh-mt { animation: none; } }
@media (prefers-reduced-motion: reduce) { .sh-shoe path, .sh-mt { animation: none; } }
-/* Tables on a phone (phone sweep, 2026-11-01): a table of three columns or more shows each row as a card, the first
+/* Tables on a phone (phone sweep, 2026-11-01): a table of three columns or more whose cells name their column (data-label) shows each row as a card, the first
cell its title and every other cell named by its column (html.js gives each cell its data-label). Narrower tables
cell its title and every other cell named by its column (html.js gives each cell its data-label). Narrower tables
stay tables. Nothing is left out and nothing scrolls sideways. */
stay tables. Nothing is left out and nothing scrolls sideways. */
@media (max-width: 640px) {
@media (max-width: 640px) {
- .table-wrap:has(> table thead th:nth-child(3)) { overflow: visible; }
- .table-wrap > table:has(thead th:nth-child(3)) { display: block; }
- .table-wrap > table:has(thead th:nth-child(3)) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
- .table-wrap > table:has(thead th:nth-child(3)) tbody { display: grid; gap: 10px; }
- .table-wrap > table:has(thead th:nth-child(3)) tr { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border, #1f2d47); border-radius: 14px; background: var(--bg-card, var(--bg-secondary, #101828)); }
- .table-wrap > table:has(thead th:nth-child(3)) td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
- .table-wrap > table:has(thead th:nth-child(3)) td:first-child { font-weight: 700; color: var(--text-primary, #e6edf7); }
- .table-wrap > table:has(thead th:nth-child(3)) td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #7386a3); }
- .table-wrap > table:has(thead th:nth-child(3)) td:empty { display: none; }
+ .table-wrap:has(> table thead th:nth-child(3)):has(> table td[data-label]) { overflow: visible; }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) { display: block; }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) tbody { display: grid; gap: 10px; }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) tr { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border, #1f2d47); border-radius: 14px; background: var(--bg-card, var(--bg-secondary, #101828)); }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td:first-child { font-weight: 700; color: var(--text-primary, #e6edf7); }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #7386a3); }
+ .table-wrap > table:has(thead th:nth-child(3)):has(td[data-label]) td:empty { display: none; }
}
}