A place to cache linked articles (think custom and personal wayback machine)
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.md 41KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314
  1. title: HTML Sketches: Whither Cards?
  2. url: https://www.colophon.cards/notes/whither-cards/
  3. hash_url: b3336418889958b9094059ebb5b761f2
  4. <style>
  5. .Card {
  6. --border-color: 0 0% 100%;
  7. max-width: 80ch;
  8. padding: 0 0 2rem;
  9. margin: 2rem auto;
  10. border: 0.5rem solid hsl(var(--border-color) / 0.5);
  11. box-shadow: var(--shadow-elevation-medium);
  12. position: relative;
  13. display: grid;
  14. grid-template-columns: 1rem 1fr 1rem;
  15. background-color: #fafafa;
  16. background-color: white;
  17. }
  18. .Card[data-editing] {
  19. box-shadow: var(--shadow-elevation-high);
  20. --border-color: var(--link-normal);
  21. }
  22. .CardBody {
  23. text-align: left;
  24. hyphens: manual;
  25. padding: 1rem 0 2rem;
  26. border: 3px none transparent;
  27. white-space: pre-wrap;
  28. font-family: inherit;
  29. font-size: 100%;
  30. grid-column: 2 / 2;
  31. grid-row: 2 / 2;
  32. margin: 0;
  33. }
  34. .CardTextarea {
  35. text-align: left;
  36. hyphens: manual;
  37. padding: 1rem 0 2rem;
  38. border: 3px none #d5d5c9;
  39. white-space: pre-wrap;
  40. font-family: inherit;
  41. font-size: 100%;
  42. grid-column: 2 / 2;
  43. grid-row: 2 / 2;
  44. margin: 0;
  45. font-variation-settings: inherit;
  46. font-feature-settings: inherit;
  47. background-color: white;
  48. overflow: hidden;
  49. }
  50. .CardDate {
  51. padding: 0.75rem 0rem 0.75rem;
  52. font-size: 0.85rem;
  53. color: #555;
  54. font-variant-caps: all-small-caps;
  55. }
  56. .CardEdit {
  57. position: absolute;
  58. bottom: -0.5rem;
  59. right: -0.5rem;
  60. display: flex;
  61. }
  62. [data-editing] .CardEdit {
  63. --shadow-color: 0 0% 31%;
  64. --shadow-elevation-high: 0.1px 0.3px 0.3px hsl(var(--shadow-color) / 0.4),
  65. 0.7px 1.6px 1.8px -0.4px hsl(var(--shadow-color) / 0.39),
  66. 1.3px 3px 3.4px -0.9px hsl(var(--shadow-color) / 0.37),
  67. 2.3px 5.2px 6px -1.3px hsl(var(--shadow-color) / 0.35),
  68. 3.8px 8.6px 9.9px -1.7px hsl(var(--shadow-color) / 0.34),
  69. 6.2px 13.9px 16px -2.1px hsl(var(--shadow-color) / 0.32),
  70. 9.6px 21.6px 24.8px -2.6px hsl(var(--shadow-color) / 0.3),
  71. 14.3px 32.3px 37.1px -3px hsl(var(--shadow-color) / 0.28);
  72. }
  73. .CardHeader {
  74. display: flex;
  75. justify-content: space-between;
  76. grid-column: 2 / 2;
  77. align-items: center;
  78. color: #555;
  79. }
  80. .CardButtons {
  81. margin: 0;
  82. }
  83. .CardTextButton {
  84. box-sizing: border-box;
  85. border: none;
  86. background-color: transparent;
  87. color: hsl(var(--link-normal));
  88. font-family: inherit;
  89. padding: 0.25rem 0.5rem 0.25rem;
  90. display: inline-flex;
  91. align-items: center;
  92. justify-content: center;
  93. font-variant-caps: all-small-caps;
  94. font-weight: 300;
  95. font-size: 0.85rem;
  96. cursor: pointer;
  97. font-variation-settings: "wght" 600, "opsz" 8;
  98. }
  99. .CardTextButton:hover {
  100. color: hsl(var(--link-hover));
  101. }
  102. .CardButton:hover {
  103. background-color: hsl(var(--link-hover));
  104. color: white;
  105. }
  106. .CardButton {
  107. --border-color: 0 0% 94.1%;
  108. box-sizing: border-box;
  109. border: none;
  110. background-color: transparent;
  111. font-family: inherit;
  112. padding: 0.45rem 2rem 0.5rem;
  113. display: inline-flex;
  114. align-items: center;
  115. justify-content: center;
  116. box-shadow: none;
  117. transition: box-shadow 250ms ease-in-out;
  118. font-variant-caps: all-small-caps;
  119. font-weight: 300;
  120. font-size: 0.85rem;
  121. cursor: pointer;
  122. font-variation-settings: "wght" 600, "opsz" 8;
  123. color: hsl(var(--link-normal));
  124. }
  125. .CardButton svg,
  126. .CardTextButton svg {
  127. margin-right: 1px;
  128. }
  129. [data-editing] .CardButton {
  130. --border-color: 0 0% 94.1%;
  131. box-sizing: border-box;
  132. border: none;
  133. background-color: hsl(var(--border-color));
  134. font-family: inherit;
  135. padding: 0.45rem 2rem 0.5rem;
  136. display: inline-flex;
  137. align-items: center;
  138. justify-content: center;
  139. box-shadow: var(--shadow-elevation-high);
  140. transition: box-shadow 250ms ease-in-out;
  141. font-variant-caps: all-small-caps;
  142. font-weight: 300;
  143. font-size: 0.85rem;
  144. cursor: pointer;
  145. font-variation-settings: "wght" 600, "opsz" 8;
  146. }
  147. .CardButton.Primary {
  148. --link-color: var(--link-normal);
  149. background-color: hsl(var(--link-color));
  150. color: white;
  151. box-shadow: var(--shadow-elevation-high);
  152. }
  153. .CardButton:hover {
  154. background-color: hsl(var(--link-hover));
  155. color: white;
  156. }
  157. .CardButton:active {
  158. box-shadow: var(--shadow-elevation-medium);
  159. }
  160. /* The Single Mode version */
  161. .PlainCard {
  162. --border-color: 0 0% 100%;
  163. max-width: 80ch;
  164. width: 100%;
  165. padding: 0;
  166. margin: 2rem auto;
  167. box-shadow: var(--shadow-elevation-medium);
  168. position: relative;
  169. display: grid;
  170. grid-template-columns: 2rem 1fr 1rem;
  171. background-color: #fafafa;
  172. background-color: white;
  173. grid-column-gap: 0.5rem;
  174. transition: box-shadow 125ms ease-in-out;
  175. }
  176. .PlainCard:focus-within {
  177. box-shadow: var(--shadow-elevation-high);
  178. outline: 3px solid #eee;
  179. }
  180. /*
  181. .Card[data-editing] {
  182. box-shadow: var(--shadow-elevation-high);
  183. --border-color: var(--link-normal);
  184. } */
  185. .PlainCardBody {
  186. text-align: left;
  187. hyphens: manual;
  188. padding: 1rem 2rem 1rem;
  189. border: 3px none transparent;
  190. white-space: pre-wrap;
  191. font-family: inherit;
  192. font-size: 100%;
  193. grid-column: 2 / 2;
  194. grid-row: 2 / 2;
  195. margin: 0;
  196. }
  197. .PlainCardTextarea {
  198. text-align: left;
  199. hyphens: manual;
  200. padding: 1rem 0 1rem;
  201. border: 3px none #d5d5c9;
  202. white-space: pre-wrap;
  203. font-family: inherit;
  204. font-size: 100%;
  205. grid-column: 2 / 2;
  206. grid-row: 2 / 2;
  207. margin: 0;
  208. font-variation-settings: inherit;
  209. font-feature-settings: inherit;
  210. background-color: white;
  211. width: 100%;
  212. box-sizing: border-box;
  213. height: 10rem;
  214. }
  215. .PlainCardEditable {
  216. text-align: left;
  217. hyphens: manual;
  218. padding: 0;
  219. border: 3px none #d5d5c9;
  220. white-space: pre-wrap;
  221. font-family: inherit;
  222. font-size: 100%;
  223. grid-column: 2 / 2;
  224. grid-row: 2 / 2;
  225. margin: 0;
  226. font-variation-settings: inherit;
  227. font-feature-settings: inherit;
  228. background-color: white;
  229. width: 100%;
  230. box-sizing: border-box;
  231. }
  232. .PlainCardDate {
  233. padding: 0.75rem 0rem 0.75rem;
  234. font-size: 0.85rem;
  235. color: #555;
  236. font-variant-caps: all-small-caps;
  237. }
  238. .PlainCardEdit {
  239. position: absolute;
  240. bottom: -0.5rem;
  241. right: -0.5rem;
  242. display: flex;
  243. }
  244. [data-editing] .CardEdit {
  245. --shadow-color: 0 0% 31%;
  246. --shadow-elevation-high: 0.1px 0.3px 0.3px hsl(var(--shadow-color) / 0.4),
  247. 0.7px 1.6px 1.8px -0.4px hsl(var(--shadow-color) / 0.39),
  248. 1.3px 3px 3.4px -0.9px hsl(var(--shadow-color) / 0.37),
  249. 2.3px 5.2px 6px -1.3px hsl(var(--shadow-color) / 0.35),
  250. 3.8px 8.6px 9.9px -1.7px hsl(var(--shadow-color) / 0.34),
  251. 6.2px 13.9px 16px -2.1px hsl(var(--shadow-color) / 0.32),
  252. 9.6px 21.6px 24.8px -2.6px hsl(var(--shadow-color) / 0.3),
  253. 14.3px 32.3px 37.1px -3px hsl(var(--shadow-color) / 0.28);
  254. }
  255. .PlainCardHeader {
  256. display: flex;
  257. justify-content: space-between;
  258. grid-column: 2 / 2;
  259. align-items: center;
  260. color: #555;
  261. font-variation-settings: "wght" 400, "opsz" 8;
  262. }
  263. .PlainCardFooter {
  264. display: flex;
  265. justify-content: space-between;
  266. grid-column: 2 / -1;
  267. align-items: center;
  268. color: #555;
  269. padding: 0 1rem;
  270. }
  271. .PlainCardButtons {
  272. margin: 0;
  273. }
  274. .PlainCardTextButton {
  275. box-sizing: border-box;
  276. border: none;
  277. background-color: transparent;
  278. color: hsl(var(--link-normal));
  279. font-family: inherit;
  280. padding: 0.25rem 0.5rem 0.25rem;
  281. display: inline-flex;
  282. align-items: center;
  283. justify-content: center;
  284. font-variant-caps: all-small-caps;
  285. font-weight: 300;
  286. font-size: 0.85rem;
  287. cursor: pointer;
  288. font-variation-settings: "wght" 600, "opsz" 8;
  289. }
  290. .PlainCardTextButton:hover {
  291. color: hsl(var(--link-hover));
  292. }
  293. .PlainCardButton:hover {
  294. background-color: hsl(var(--link-hover));
  295. color: white;
  296. }
  297. .PlainCardButton {
  298. --border-color: 0 0% 94.1%;
  299. box-sizing: border-box;
  300. border: none;
  301. background-color: hsl(var(--border-color));
  302. font-family: inherit;
  303. padding: 0.45rem 2rem 0.5rem;
  304. display: inline-flex;
  305. align-items: center;
  306. justify-content: center;
  307. box-shadow: var(--shadow-elevation-high);
  308. transition: box-shadow 250ms ease-in-out;
  309. font-variant-caps: all-small-caps;
  310. font-weight: 300;
  311. font-size: 0.85rem;
  312. cursor: pointer;
  313. font-variation-settings: "wght" 600, "opsz" 8;
  314. }
  315. .PlainCardButton svg,
  316. .PlainCardTextButton svg {
  317. margin-right: 1px;
  318. }
  319. .PlainCardButton.Primary {
  320. --link-color: var(--link-normal);
  321. background-color: hsl(var(--link-color));
  322. color: white;
  323. box-shadow: var(--shadow-elevation-high);
  324. }
  325. .PlainCardButton:hover {
  326. background-color: hsl(var(--link-hover));
  327. color: white;
  328. }
  329. .PlainCardButton:active {
  330. box-shadow: var(--shadow-elevation-medium);
  331. }
  332. .PlainCardSidebar {
  333. grid-column: 1 / 1;
  334. grid-row: 1 / 4;
  335. display: flex;
  336. justify-content: space-between;
  337. align-items: center;
  338. color: #555;
  339. flex-direction: column;
  340. padding: 0.5rem 0;
  341. background-color: rgb(248 248 248);
  342. }
  343. .PlainCardGrabHandle {
  344. width: 0;
  345. border: none;
  346. border-left: 4px solid #e1e1e1;
  347. height: 100%;
  348. margin: 2.5rem 0;
  349. }
  350. .PlainCardGrabHandle:hover {
  351. cursor: grab;
  352. }
  353. .PlainCardHeader.Handle {
  354. display: grid;
  355. grid-template-columns: 1fr 1fr 1fr;
  356. }
  357. .PlainCardGrabHandle.Header {
  358. width: 5rem;
  359. border: none;
  360. margin: 0 auto;
  361. height: 0.5rem;
  362. display: inline-flex;
  363. padding: calc(0.25rem + 4px) 0.5rem 0.25rem;
  364. border-radius: 8px;
  365. }
  366. .PlainCardGrabHandle.Header:hover {
  367. background-color: #f0f0f0;
  368. }
  369. .PlainCardGrabHandle.Header::before {
  370. content: "";
  371. border-top: 4px solid #ccc;
  372. height: 0.25rem;
  373. width: 100%;
  374. display: block;
  375. margin: auto;
  376. }
  377. .CardNumber {
  378. text-align: right;
  379. }
  380. /* The Single Mode version */
  381. .FieldCard {
  382. --border-color: 0 0% 100%;
  383. max-width: 80ch;
  384. width: 100%;
  385. padding: 0;
  386. margin: 2rem auto;
  387. box-shadow: var(--shadow-elevation-medium);
  388. position: relative;
  389. display: grid;
  390. grid-template-columns: 2rem 1fr 1rem;
  391. background-color: #fafafa;
  392. background-color: white;
  393. grid-gap: 0.5rem;
  394. transition: box-shadow 125ms ease-in-out;
  395. }
  396. .FieldCard:focus-within {
  397. box-shadow: var(--shadow-elevation-high);
  398. outline: 3px solid #eee;
  399. }
  400. /*
  401. .Card[data-editing] {
  402. box-shadow: var(--shadow-elevation-high);
  403. --border-color: var(--link-normal);
  404. } */
  405. .FieldCardSummary {
  406. grid-column: 2 / 2;
  407. }
  408. .FieldCardLabel {
  409. font-size: 0.85rem;
  410. cursor: pointer;
  411. font-variation-settings: "wght" 600, "opsz" 8;
  412. font-variant-caps: all-small-caps;
  413. display: block;
  414. }
  415. .FieldCardInput {
  416. text-align: left;
  417. hyphens: manual;
  418. padding: 0.25rem;
  419. border: 1px solid #f0f0f0;
  420. white-space: pre-wrap;
  421. font-family: inherit;
  422. font-size: 100%;
  423. margin: 0;
  424. font-variation-settings: inherit;
  425. font-feature-settings: inherit;
  426. background-color: white;
  427. width: 100%;
  428. box-sizing: border-box;
  429. }
  430. .FieldCardBody {
  431. text-align: left;
  432. hyphens: manual;
  433. padding: 1rem 2rem 1rem;
  434. border: 3px none transparent;
  435. white-space: pre-wrap;
  436. font-family: inherit;
  437. font-size: 100%;
  438. margin: 0;
  439. }
  440. .FieldCardEditable {
  441. text-align: left;
  442. hyphens: manual;
  443. padding: 0;
  444. padding: 0.25rem;
  445. border: 1px solid #f0f0f0;
  446. white-space: pre-wrap;
  447. font-family: inherit;
  448. font-size: 100%;
  449. grid-column: 2 / 2;
  450. margin: 0;
  451. font-variation-settings: inherit;
  452. font-feature-settings: inherit;
  453. background-color: white;
  454. width: 100%;
  455. box-sizing: border-box;
  456. }
  457. .FieldCardDate {
  458. padding: 0.75rem 0rem 0.75rem;
  459. font-size: 0.85rem;
  460. color: #555;
  461. font-variant-caps: all-small-caps;
  462. }
  463. .FieldCardEdit {
  464. position: absolute;
  465. bottom: -0.5rem;
  466. right: -0.5rem;
  467. display: flex;
  468. }
  469. [data-editing] .CardEdit {
  470. --shadow-color: 0 0% 31%;
  471. --shadow-elevation-high: 0.1px 0.3px 0.3px hsl(var(--shadow-color) / 0.4),
  472. 0.7px 1.6px 1.8px -0.4px hsl(var(--shadow-color) / 0.39),
  473. 1.3px 3px 3.4px -0.9px hsl(var(--shadow-color) / 0.37),
  474. 2.3px 5.2px 6px -1.3px hsl(var(--shadow-color) / 0.35),
  475. 3.8px 8.6px 9.9px -1.7px hsl(var(--shadow-color) / 0.34),
  476. 6.2px 13.9px 16px -2.1px hsl(var(--shadow-color) / 0.32),
  477. 9.6px 21.6px 24.8px -2.6px hsl(var(--shadow-color) / 0.3),
  478. 14.3px 32.3px 37.1px -3px hsl(var(--shadow-color) / 0.28);
  479. }
  480. .FieldCardHeader {
  481. display: flex;
  482. justify-content: space-between;
  483. grid-column: 2 / 2;
  484. align-items: center;
  485. color: #555;
  486. font-variation-settings: "wght" 400, "opsz" 8;
  487. }
  488. .FieldCardFooter {
  489. display: flex;
  490. justify-content: space-between;
  491. grid-column: 2 / -1;
  492. align-items: center;
  493. color: #555;
  494. padding: 0 1rem;
  495. }
  496. .FieldCardButtons {
  497. margin: 0;
  498. }
  499. .FieldCardTextButton {
  500. box-sizing: border-box;
  501. border: none;
  502. background-color: transparent;
  503. color: hsl(var(--link-normal));
  504. font-family: inherit;
  505. padding: 0.25rem 0.5rem 0.25rem;
  506. display: inline-flex;
  507. align-items: center;
  508. justify-content: center;
  509. font-variant-caps: all-small-caps;
  510. font-weight: 300;
  511. font-size: 0.85rem;
  512. cursor: pointer;
  513. font-variation-settings: "wght" 600, "opsz" 8;
  514. }
  515. .FieldCardTextButton:hover {
  516. color: hsl(var(--link-hover));
  517. }
  518. .FieldCardButton:hover {
  519. background-color: hsl(var(--link-hover));
  520. color: white;
  521. }
  522. .FieldCardButton {
  523. --border-color: 0 0% 94.1%;
  524. box-sizing: border-box;
  525. border: none;
  526. background-color: hsl(var(--border-color));
  527. font-family: inherit;
  528. padding: 0.45rem 2rem 0.5rem;
  529. display: inline-flex;
  530. align-items: center;
  531. justify-content: center;
  532. box-shadow: var(--shadow-elevation-high);
  533. transition: box-shadow 250ms ease-in-out;
  534. font-variant-caps: all-small-caps;
  535. font-weight: 300;
  536. font-size: 0.85rem;
  537. cursor: pointer;
  538. font-variation-settings: "wght" 600, "opsz" 8;
  539. }
  540. .FieldCardButton svg,
  541. .FieldCardTextButton svg {
  542. margin-right: 1px;
  543. }
  544. .FieldCardButton.Primary {
  545. --link-color: var(--link-normal);
  546. background-color: hsl(var(--link-color));
  547. color: white;
  548. box-shadow: var(--shadow-elevation-high);
  549. }
  550. .FieldCardButton:hover {
  551. background-color: hsl(var(--link-hover));
  552. color: white;
  553. }
  554. .FieldCardButton:active {
  555. box-shadow: var(--shadow-elevation-medium);
  556. }
  557. .FieldCardSidebar {
  558. grid-column: 1 / 1;
  559. grid-row: 1 / 4;
  560. display: flex;
  561. justify-content: space-between;
  562. align-items: center;
  563. color: #555;
  564. flex-direction: column;
  565. padding: 0.5rem 0;
  566. background-color: rgb(248 248 248);
  567. }
  568. .FieldCardGrabHandle {
  569. width: 0;
  570. border: none;
  571. border-left: 4px solid #e1e1e1;
  572. height: 100%;
  573. margin: 2.5rem 0;
  574. }
  575. .FieldCardGrabHandle:hover {
  576. cursor: grab;
  577. }
  578. .FieldCardHeader.Handle {
  579. display: grid;
  580. grid-template-columns: 1fr 1fr 1fr;
  581. }
  582. .FieldCardGrabHandle.Header {
  583. width: 5rem;
  584. border: none;
  585. margin: 0 auto;
  586. height: 0.5rem;
  587. display: inline-flex;
  588. padding: calc(0.25rem + 4px) 0.5rem 0.25rem;
  589. border-radius: 8px;
  590. }
  591. .FieldCardGrabHandle.Header:hover {
  592. background-color: #f0f0f0;
  593. }
  594. .FieldCardGrabHandle.Header::before {
  595. content: "";
  596. border-top: 4px solid #ccc;
  597. height: 0.25rem;
  598. width: 100%;
  599. display: block;
  600. margin: auto;
  601. }
  602. .CardNumber {
  603. text-align: right;
  604. }
  605. /* The Single Mode version */
  606. .ModeCard {
  607. --border-color: 0 0% 100%;
  608. max-width: 80ch;
  609. width: 100%;
  610. padding: 0;
  611. margin: 2rem auto;
  612. box-shadow: var(--shadow-elevation-medium);
  613. position: relative;
  614. display: grid;
  615. grid-template-columns: 2rem 1fr 1rem;
  616. background-color: #fafafa;
  617. background-color: white;
  618. grid-gap: 0.5rem;
  619. transition: box-shadow 125ms ease-in-out;
  620. --shadow-color: 0deg 0% 0%;
  621. --shadow-elevation-low: 0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.11),
  622. 0.4px 0.9px 1.1px -1.2px hsl(var(--shadow-color) / 0.11),
  623. 1px 2.1px 2.6px -2.5px hsl(var(--shadow-color) / 0.11);
  624. --shadow-elevation-medium: 0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.12),
  625. 0.9px 1.7px 2.2px -0.8px hsl(var(--shadow-color) / 0.12),
  626. 2.1px 4.3px 5.4px -1.7px hsl(var(--shadow-color) / 0.12),
  627. 5.3px 10.5px 13.2px -2.5px hsl(var(--shadow-color) / 0.12);
  628. --shadow-elevation-high: 0.3px 0.5px 0.7px hsl(var(--shadow-color) / 0.11),
  629. 1.6px 3.2px 4px -0.4px hsl(var(--shadow-color) / 0.11),
  630. 3px 5.9px 7.4px -0.7px hsl(var(--shadow-color) / 0.11),
  631. 4.9px 9.8px 12.3px -1.1px hsl(var(--shadow-color) / 0.11),
  632. 7.8px 15.7px 19.7px -1.4px hsl(var(--shadow-color) / 0.11),
  633. 12.3px 24.5px 30.8px -1.8px hsl(var(--shadow-color) / 0.11),
  634. 18.7px 37.3px 46.9px -2.1px hsl(var(--shadow-color) / 0.11),
  635. 27.5px 55px 69.2px -2.5px hsl(var(--shadow-color) / 0.11);
  636. }
  637. .ModeCard:focus-within {
  638. box-shadow: var(--shadow-elevation-high);
  639. outline: 3px solid #eee;
  640. }
  641. /*
  642. .Card[data-editing] {
  643. box-shadow: var(--shadow-elevation-high);
  644. --border-color: var(--link-normal);
  645. } */
  646. .ModeCardSummary {
  647. grid-column: 2 / 2;
  648. }
  649. .ModeCardLabel {
  650. font-size: 0.85rem;
  651. cursor: pointer;
  652. font-variation-settings: "wght" 600, "opsz" 8;
  653. font-variant-caps: all-small-caps;
  654. display: block;
  655. }
  656. .ModeCardName {
  657. font-size: 1rem;
  658. cursor: pointer;
  659. font-variation-settings: "wght" 600, "opsz" 8;
  660. font-variant-caps: normal;
  661. display: block;
  662. grid-column: 2 / 2;
  663. margin: 0.25rem 0 1rem;
  664. }
  665. /*
  666. .ModeCard input {
  667. text-align: left;
  668. hyphens: manual;
  669. padding: 0;
  670. border: 1px solid #f0f0f0;
  671. white-space: pre-wrap;
  672. font-family: inherit;
  673. font-size: 100%;
  674. margin: 0;
  675. font-variation-settings: inherit;
  676. font-feature-settings: inherit;
  677. background-color: white;
  678. width: 100%;
  679. box-sizing: border-box;
  680. } */
  681. .ModeCardBody {
  682. text-align: left;
  683. hyphens: manual;
  684. padding: 0;
  685. white-space: pre-wrap;
  686. font-family: inherit;
  687. font-size: 100%;
  688. margin: 0;
  689. grid-column: 2 / 2;
  690. margin-bottom: 1rem;
  691. }
  692. .ModeCardEditable {
  693. text-align: left;
  694. hyphens: manual;
  695. padding: 0;
  696. padding: 0.25rem;
  697. border: 1px solid #f0f0f0;
  698. white-space: pre-wrap;
  699. font-family: inherit;
  700. font-size: 100%;
  701. grid-column: 2 / 2;
  702. margin: 0;
  703. font-variation-settings: inherit;
  704. font-feature-settings: inherit;
  705. background-color: white;
  706. width: 100%;
  707. box-sizing: border-box;
  708. height: 7rem;
  709. }
  710. .ModeCardDate {
  711. padding: 0.75rem 0rem 0.75rem;
  712. font-size: 0.85rem;
  713. color: #555;
  714. font-variant-caps: all-small-caps;
  715. }
  716. .ModeCardEdit {
  717. position: absolute;
  718. bottom: -0.5rem;
  719. right: -0.5rem;
  720. display: flex;
  721. }
  722. [data-editing] .CardEdit {
  723. --shadow-color: 0 0% 31%;
  724. --shadow-elevation-high: 0.1px 0.3px 0.3px hsl(var(--shadow-color) / 0.4),
  725. 0.7px 1.6px 1.8px -0.4px hsl(var(--shadow-color) / 0.39),
  726. 1.3px 3px 3.4px -0.9px hsl(var(--shadow-color) / 0.37),
  727. 2.3px 5.2px 6px -1.3px hsl(var(--shadow-color) / 0.35),
  728. 3.8px 8.6px 9.9px -1.7px hsl(var(--shadow-color) / 0.34),
  729. 6.2px 13.9px 16px -2.1px hsl(var(--shadow-color) / 0.32),
  730. 9.6px 21.6px 24.8px -2.6px hsl(var(--shadow-color) / 0.3),
  731. 14.3px 32.3px 37.1px -3px hsl(var(--shadow-color) / 0.28);
  732. }
  733. .ModeCardHeader {
  734. display: flex;
  735. justify-content: space-between;
  736. grid-column: 2 / 2;
  737. align-items: center;
  738. color: #555;
  739. font-variation-settings: "wght" 400, "opsz" 8;
  740. }
  741. .ModeCardFooter {
  742. display: flex;
  743. justify-content: space-between;
  744. grid-column: 2 / 2;
  745. align-items: center;
  746. color: #555;
  747. padding: 0;
  748. }
  749. .ModeCardButtons {
  750. margin: 0;
  751. }
  752. .ModeCardTextButton {
  753. box-sizing: border-box;
  754. border: none;
  755. background-color: transparent;
  756. color: hsl(var(--link-normal));
  757. font-family: inherit;
  758. padding: 0.25rem 0.5rem 0.25rem;
  759. display: inline-flex;
  760. align-items: center;
  761. justify-content: center;
  762. font-variant-caps: all-small-caps;
  763. font-weight: 300;
  764. font-size: 0.85rem;
  765. cursor: pointer;
  766. font-variation-settings: "wght" 600, "opsz" 8;
  767. }
  768. .ModeCardTextButton:hover {
  769. color: hsl(var(--link-hover));
  770. }
  771. .ModeCardButton:hover {
  772. background-color: hsl(var(--link-hover));
  773. color: white;
  774. }
  775. .ModeCardButton {
  776. --border-color: 0 0% 94.1%;
  777. box-sizing: border-box;
  778. border: none;
  779. background-color: hsl(var(--border-color));
  780. font-family: inherit;
  781. padding: 0.45rem 2rem 0.5rem;
  782. display: inline-flex;
  783. align-items: center;
  784. justify-content: center;
  785. box-shadow: var(--shadow-elevation-high);
  786. transition: box-shadow 250ms ease-in-out;
  787. font-variant-caps: all-small-caps;
  788. font-weight: 300;
  789. font-size: 0.85rem;
  790. cursor: pointer;
  791. font-variation-settings: "wght" 600, "opsz" 8;
  792. }
  793. .ModeCardButton svg,
  794. .ModeCardTextButton svg {
  795. margin-right: 1px;
  796. }
  797. .ModeCardButton.Primary {
  798. --link-color: var(--link-normal);
  799. background-color: hsl(var(--link-color));
  800. color: white;
  801. box-shadow: var(--shadow-elevation-high);
  802. }
  803. .ModeCardButton:hover {
  804. background-color: hsl(var(--link-hover));
  805. color: white;
  806. }
  807. .ModeCardButton:active {
  808. box-shadow: var(--shadow-elevation-medium);
  809. }
  810. .ModeCardSidebar {
  811. grid-column: 1 / 1;
  812. grid-row: 1 / 5;
  813. display: flex;
  814. justify-content: space-between;
  815. align-items: center;
  816. color: #555;
  817. flex-direction: column;
  818. padding: 0.5rem 0;
  819. background-color: rgb(248 248 248);
  820. }
  821. .ModeCardGrabHandle {
  822. width: 0;
  823. border: none;
  824. border-left: 4px solid #e1e1e1;
  825. height: 100%;
  826. margin: 2.5rem 0;
  827. }
  828. .ModeCardGrabHandle:hover {
  829. cursor: grab;
  830. }
  831. .ModeCardHeader.Handle {
  832. display: grid;
  833. grid-template-columns: 1fr 5.5rem;
  834. }
  835. .ModeCardGrabHandle.Header {
  836. width: 5rem;
  837. border: none;
  838. margin: 0 auto;
  839. height: 0.5rem;
  840. display: inline-flex;
  841. padding: calc(0.25rem + 4px) 0.5rem 0.25rem;
  842. border-radius: 8px;
  843. }
  844. .ModeCardGrabHandle.Header:hover {
  845. background-color: #f0f0f0;
  846. }
  847. .ModeCardGrabHandle.Header::before {
  848. content: "";
  849. border-top: 4px solid #ccc;
  850. height: 0.25rem;
  851. width: 100%;
  852. display: block;
  853. margin: auto;
  854. }
  855. .CardNumber {
  856. text-align: right;
  857. }
  858. .ModeCardLinks {
  859. grid-column: 2 / 2;
  860. padding: 0.25rem 0.25rem;
  861. }
  862. .ModeCardAttachments {
  863. grid-column: 2 / 2;
  864. padding: 0;
  865. }
  866. .ModeCardLink {
  867. box-shadow: var(--shadow-elevation-low);
  868. padding: 0.5rem;
  869. padding-left: 4rem;
  870. background-color: #f9f9f9;
  871. border: 1px solid #f0f0f0;
  872. border-radius: 8px;
  873. margin: 0.5rem 0;
  874. }
  875. .ModeCardLink.Internal {
  876. background-color: white;
  877. border-radius: 0px;
  878. }
  879. .ModeCardLink.Attachment {
  880. background-color: white;
  881. border-radius: 0px;
  882. margin: 0.5rem -0.5rem;
  883. margin-right: -1.5rem;
  884. }
  885. /** --------------------------------------------------------------------
  886. ARIA Switch Toggle Button
  887. --------------------------------------------------------------------- */
  888. .switch-toggle {
  889. background: none;
  890. border: none;
  891. cursor: default;
  892. display: block;
  893. font-size: inherit;
  894. line-height: 1;
  895. margin: 1em 0 0;
  896. padding: 0.5em 0;
  897. position: relative;
  898. text-align: left;
  899. transition: box-shadow 0.2s ease-in-out;
  900. width: 100%;
  901. }
  902. .switch-toggle:focus {
  903. outline: none;
  904. }
  905. /* negate 'flash' of text color when pressing a button in some browsers */
  906. .switch-toggle:active {
  907. color: inherit;
  908. }
  909. /* using the before/after pseudo elements of the span to create the "switch" */
  910. .switch-toggle span:before,
  911. .switch-toggle span:after {
  912. border: 1px solid #565656;
  913. content: "";
  914. position: absolute;
  915. top: 50%;
  916. transform: translateY(-50%);
  917. }
  918. /* styling specific to the knob of the switch */
  919. .switch-toggle span:after {
  920. background: #fff;
  921. border-radius: 100%;
  922. height: 1.5em;
  923. right: 1.5em;
  924. transition: right 0.1825s ease-in-out;
  925. width: 1.5em;
  926. }
  927. /* styling specific to the knob "container" */
  928. .switch-toggle span:before {
  929. background: #eee;
  930. border-radius: 1.75em;
  931. height: 1.75em;
  932. right: 0.25em;
  933. transition: background 0.2s ease-in-out;
  934. width: 2.75em;
  935. }
  936. .switch-toggle span {
  937. pointer-events: none;
  938. }
  939. .switch-toggle:not([data-keep-disabled]):hover span:before,
  940. .switch-toggle:not([data-keep-disabled]):focus span:before {
  941. outline: 2px solid #2196f3;
  942. outline-offset: 2px;
  943. }
  944. /* change the position of the knob to indicate it has been checked*/
  945. .switch-toggle[aria-checked="true"] span:after {
  946. right: 0.25em;
  947. }
  948. /* update the color of the "container" to further visually indicate state */
  949. .switch-toggle[aria-checked="true"] span:before {
  950. background: #2196f3;
  951. }
  952. .switch-toggle[disabled] span,
  953. .switch-toggle[aria-disabled="true"] span {
  954. opacity: 0.65;
  955. }
  956. /**
  957. * Toggle switch modifications for displaying On/Off labels
  958. */
  959. .switch-toggle .show-labels:before {
  960. content: "Off";
  961. color: rgba(10, 10, 10, 1);
  962. line-height: 1.6;
  963. text-indent: 1.625em;
  964. width: 3.5em;
  965. }
  966. .switch-toggle[aria-checked="false"] .show-labels:after {
  967. right: 2.2em;
  968. }
  969. .switch-toggle[aria-checked="true"] .show-labels:before {
  970. color: rgba(255, 255, 255, 1);
  971. content: "On";
  972. text-indent: 0.25em;
  973. text-shadow: 0 0 1px #000;
  974. }
  975. @media screen and (-ms-high-contrast: active) {
  976. .switch-toggle span:after {
  977. background-color: windowText;
  978. }
  979. }
  980. /* containing label */
  981. .check-switch {
  982. display: block;
  983. overflow: hidden;
  984. padding: 0.5em 0;
  985. position: relative;
  986. }
  987. /* using the before/after pseudo elements of the span to create the "switch" */
  988. .check-switch span:before,
  989. .check-switch span:after {
  990. border: 1px solid #565656;
  991. content: "";
  992. position: absolute;
  993. top: 50%;
  994. transform: translateY(-50%);
  995. }
  996. /* styling specific to the knob of the switch */
  997. .check-switch span:after {
  998. background: #fff;
  999. border-radius: 100%;
  1000. height: 1.5em;
  1001. right: 1.5em;
  1002. transition: right 0.1825s ease-in-out;
  1003. width: 1.5em;
  1004. }
  1005. /* styling specific to the knob "container" */
  1006. .check-switch span:before {
  1007. background: #eee;
  1008. border-radius: 1.75em;
  1009. height: 1.75em;
  1010. right: 0.25em;
  1011. transition: background 0.2s ease-in-out;
  1012. width: 2.75em;
  1013. }
  1014. /* hide the actual checkbox from view, but not from keyboards or ATs.
  1015. Instead of standard visually hidden styling, instead set opacity to
  1016. to 0 and set to full height/width of container element so that VO focus
  1017. ring outlines the component, instead of a tiny box within the component.
  1018. This will also allow for the checkbox input to be discovered if someone
  1019. were to search by touch.
  1020. */
  1021. .check-switch input {
  1022. height: 100%;
  1023. left: 0;
  1024. opacity: 0;
  1025. position: absolute;
  1026. top: 0;
  1027. width: 100%;
  1028. }
  1029. .check-switch input:disabled + span,
  1030. .check-switch input[aria-disabled="true"] + span {
  1031. opacity: 0.65;
  1032. }
  1033. .check-switch:hover input:not([data-keep-disabled]) + span:before,
  1034. .check-switch input:not([data-keep-disabled]):focus + span:before {
  1035. outline: 2px solid #2196f3;
  1036. outline-offset: 2px;
  1037. }
  1038. /* change the position of the knob to indicate it has been checked*/
  1039. .check-switch input:checked + span:after {
  1040. right: 0.25em;
  1041. }
  1042. /* update the color of the "container" to further visually indicate state */
  1043. .check-switch input:checked + span:before {
  1044. background: #2196f3;
  1045. }
  1046. /* 'color in' the switch knob in high contrast mode by giving it
  1047. a large border */
  1048. @media screen and (-ms-high-contrast: active) {
  1049. .check-switch span:after {
  1050. background-color: windowText;
  1051. }
  1052. }
  1053. </style>
  1054. <p><strong>Warning: this post contains mockups done in HTML and CSS which aren’t likely to work well in feed readers.</strong></p>
  1055. <p>The list in the previous post has a lot of <a href="https://www.colophon.cards/notes/10-questions/">open questions</a> related to cards. Now, there are a lot of approaches to answering these sorts of questions—research, surveys, testing—but in this specific context I think it would be a mistake to dive right into one of those.</p>
  1056. <ul>
  1057. <li>I’ve already done a lot of research on this, it’s been a big part of my life for the past five years</li>
  1058. <li>I’ve deliberately chosen a target audience of which I am somewhat representative (knowledge worker in tech or publishing)</li>
  1059. <li>I may have the questions I need answered but I don’t have the questions I need to ask</li>
  1060. </ul>
  1061. <p>It’s the last one that’s tricky. If you ask questions that people don’t know the answer to or is outside of their expertise, most of the time you’re just going to get whatever they think you want to hear. The best thing to do is to observe their behaviour as they are doing the work you are aiming to help with. See what problems crop up. Things get difficult if you can’t do that but you can somewhat make do if, say, you are a part of the audience you are aiming to serve. But you still need to figure out if the audience understands the conceptual model of the UIs you are planning to use, if it actually does the job it’s supposed to, if the job it’s supposed to do actually solves the problem they have.</p>
  1062. <p>To do that I need to be clearer about what I’m asking. I need to clarify, in my mind, what <em>I</em> mean when I say ‘card’.</p>
  1063. <p>This is where sketches come in. Some use special apps for doing these kind of sketch mockups. Some just sketch it, literally. I like to sketch in HTML and CSS as that’s a lot quicker and simpler for me than most of these other tools.</p>
  1064. <p>So, the goal is to sketch out a few approaches and iteratively inch my way towards a cohesive card concept that will then become the basis of future testing, research, and work.</p>
  1065. <h2>Plain text with modes</h2>
  1066. <p>First up is plain text, first line of the card body serves as a summary, the rest is the card detail. Separate modes <em>on card</em> for editing and viewing.</p>
  1067. <div class="Card">
  1068. <p class="CardBody">This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will plaintext do?
  1069.  
  1070. Is markdown a useful compromise?
  1071. </p></div>
  1072. <div class="Card" data-editing>
  1073. <p class="CardBody">This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will plaintext do?
  1074.  
  1075. Is markdown a useful compromise?</p>
  1076. </div>
  1077. <p>Ugh.</p>
  1078. <p>How about we just assume I get autosaving working and skip the whole “Cancel” and “Save” thing?</p>
  1079. <div class="Card" data-editing>
  1080. <p class="CardBody">This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will plaintext do?
  1081.  
  1082. Is markdown a useful compromise?</p>
  1083. </div>
  1084. <p>Then the issue is <em>how do you exit the edit mode?</em> Automatically exiting edit mode whenever the card loses focus might be one way, but that would get frustrating quickly.</p>
  1085. <h2>Plain text, always edit</h2>
  1086. <p>What about just having the card always in edit mode? That’s how most native apps work. You don’t have to click ‘edit’ anywhere in Bear to edit a note.</p>
  1087. <p>So, plain text, first line of the card body serves as a summary, the rest is the card detail. Always editing but with autosave of some sort.</p>
  1088. <p>Always being in the edit mode has issues when it comes to interacting with links and references but, provided that it’s the right overall direction, I think we might be able to get around that using link previews much like you see in Facebook’s posting widget or by using tooltips like Google Docs. It would be <em>hassle</em> and make accessibility a bit more complicated, but overall doable.</p>
  1089. <p><em>If</em> the single-mode direction is worth it, overall.</p>
  1090. <p>So…</p>
  1091. <p class="PlainCard" data-editing>
  1092. </p>
  1093. <p>This feels a bit cluttered but most of the buttons are just guesses at the sort of functionality a card might have. But, one notion that I think might be a useful guide here is <a href="https://www.taskpaper.com/">Taskpaper’s idea</a> that the note’s text is the API so links are just links in the text. Possibly extracted and presented with preview widgets as you see on Twitter or Facebook. But either way it doesn’t need a button. And the star thing was just a whim. Let’s drop both and clean things up a little bit.</p>
  1094. <p>I can tweak the implementation of the textarea a bit as well. Use a simple <code>contenteditable</code> to make it autogrowing.</p>
  1095. <div class="PlainCard" data-editing>
  1096. <p class="PlainCardEditable" contenteditable>This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will plaintext do?
  1097.  
  1098. Is markdown a useful compromise?</p>
  1099. </div>
  1100. <p>How to handle deletes, archiving, or trashing of a card is its own set of problems. But I’m thinking that it might actually belong in the margin or outside the card in some way.</p>
  1101. <p>Something like this (if you’ll excuse the poor snap):</p>
  1102. <img src="https://www.colophon.cards/assets/trash-sketch.jpg" alt="Quick sketch of trash button in the sidebar next to a card. Shows that the idea is that the card would animate out into the margin when the button is pressed">
  1103. <p>So:</p>
  1104. <div class="PlainCard" data-editing>
  1105. <p class="PlainCardEditable" contenteditable>This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will plaintext do?
  1106.  
  1107. Is markdown a useful compromise?</p>
  1108. </div>
  1109. <p>The idea with the grab handle is that you should be able to rearrange the order of the cards in a thread/stack and even drag it out into the sidebar and position as you wish. You need it as the card body itself is always editable so you can’t make the <em>whole</em> card draggable. This feels like a core affordance for the app so, until testing reveals otherwise, I’m going to keep it in the sketches.</p>
  1110. <p>But it doesn’t have to be where it is here. It could be placed in the empty space in the header.</p>
  1111. <div class="PlainCard" data-editing>
  1112. <p class="PlainCardEditable" contenteditable>This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will plaintext do?
  1113.  
  1114. Is markdown a useful compromise?</p>
  1115. </div>
  1116. <p>This could work but I honestly don’t think it’s objectively superior to the margin grab handle.</p>
  1117. <p>Either way, the grab handle isn’t even close to being an intuitive affordance and will need a complete rethink and design but this will do while sketching to get a feel for the card problem and figure out what to test.</p>
  1118. <h2>But, wait, this doesn’t work</h2>
  1119. <p>All of the above is useful for hashing out certain themes and directions</p>
  1120. <p>Now I know that I need to:</p>
  1121. <ul>
  1122. <li>Avoid the Edit → Save cycle. Maybe not avoid the edit mode, per se.</li>
  1123. <li>Avoid <code>save</code> gestures and loops in general. Autosave needs to work.</li>
  1124. <li>Use the card’s text as an API surface for links, much like social media does. (Leverage familiarity.)</li>
  1125. <li>Consider trash, archiving, and delete <em>in context</em>, which means we need to tackle it in the thread/stack view.</li>
  1126. <li>The grab handle needs more work, probably in the thread context, like deletions.</li>
  1127. </ul>
  1128. <p>The problem with the above sketches is that they wouldn’t work with the app’s concept as I’ve planned it.</p>
  1129. <p>Namely, the concept is that it’s a ‘find first’ UI. Each card is supposed to have a unique name or summary. With a single body card, the first 500 or so characters* would serve as the card’s summary.</p>
  1130. <aside>
  1131. <p><em>* Still a guess but, based on the DB and indexes available, the responsiveness this kind of UI needs, and the fact that with emojis even bog standard English needs to support multi-byte characters, ~500 characters is the ballpark maximum. I could go over but that’d either limit my DB choices when it comes to implementation or throw internationalisation out of the window or limit the find feature to just the first 500 or so characters of the summary.</em></p>
  1132. </aside>
  1133. <p>The problem with single-body cards is that the app needs to validate the card’s summary: it has to be unique. There’s also the question as to whether you’d allow <code>null</code> or anonymous cards. These would have an internal DB identifier but no external name/summary. Basically, these would be cards that you could only find through a full-text search at some point down the line or by scrolling to its position in the thread. Anonymous cards <em>could</em> be useful. But it could potentially make a clumsy ‘select all’ disastrous. I semi-regularly delete an entire file’s contents by accident this way. Not much of an issue when you have undos and version control but a major issue if doing so made the file <em>unfindable</em>. It’s much harder to revert changes to a file <em>if you can’t find it</em>.</p>
  1134. <p>It’s likely that we’re going to need a separate field for the name or summary and it’s certain that this field is going to need stricter validation than the details or body field.</p>
  1135. <p>I’m going to need to sketch out a slightly more realistic card.</p>
  1136. <p>Even without links, attachments, or cross-references, this feels more clunky. You could finesse the design, streamline it here and there, but if we’re going to have the card always editable then this would mean a fairly high inherent ‘clunkiness’ baseline that you can’t avoid.</p>
  1137. <p>I think it’s clear that we’ll need an edit mode. Can the edit mode be made nicer if we assume I can get autosaving to work nicely?</p>
  1138. <h2>Revisiting the “Edit Mode” and makig it nicer</h2>
  1139. <p>Having separate “read/browse” and “edit” modes gives me a little bit more freedom when designing each version. I still think they need to be very similar, for usability’s sake. This one’s using <a href="https://scottaohara.github.io/a11y_styled_form_controls/src/checkbox--switch/">Scott O’Hara’s switch component</a> though since this is just an HTML mockup it doesn’t do anything.</p>
  1140. <div class="ModeCard" data-editing>
  1141. <h3 class="ModeCardName">You'll use this to find this card</h3>
  1142. <div class="ModeCardBody"><p>This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will </p><a href="#">plaintext</a><p> do?
  1143.  
  1144. Is markdown a useful compromise?</p></div>
  1145. </div>
  1146. <p>One issue that this card sketch doesn’t highlight is that the card-and-thread model is supposed to offer similar affordances as many social media services, like Twitter or Facebook. Those services have both highly optimised posting flows (they want to make it really, really easy for you to post quickly) and are also familiar to many. But the creation of a full card with title <em>feels</em> a bit off for a default in this context. You pretty much need to be able to create the simple kind of plain text cards that I sketched up above but without the anonymity issue that would prevent cards from being found or referred to.</p>
  1147. <p>This is why I prefer the summary label for the card’s ‘name’, at least for the moment. It implies a potentially longer text than ‘name’. (<a href="https://twitter.com/John_Pettigrew/status/1466008916307894277">Thanks for the suggestion, John!</a>) So, I could support a slightly different style for cards that only have a summary and no text in the body.</p>
  1148. <div class="ModeCard" data-editing>
  1149. <p class="ModeCardBody">This is a card summary. As a summary it would work more like a tweet would and wouldn't support Markdown or rich text.</p>
  1150. </div>
  1151. <p>With edit mode on:</p>
  1152. <p>Edit mode would need to validate the summary on the fly, make sure it isn’t empty and that it is unique. And it could lock the card in edit mode if you enter an invalid summary.</p>
  1153. <p>This is aesthetically a bit rough but it feels right as an initial conceptual model. But I need to see it with more ‘stuff’ to be sure. Some links and attachments.</p>
  1154. <div class="ModeCard" data-editing>
  1155. <h3 class="ModeCardName">You'll use this to find this card</h3>
  1156. <div class="ModeCardBody"><p>This is a card body. Or card text. What does this look like? What does this feel like? How does this work? Does it need rich text? Will </p><a href="#">plaintext</a><p> do?
  1157.  
  1158. Is markdown a useful compromise?</p></div>
  1159. <div class="ModeCardLinks">
  1160. <div class="ModeCardLink">
  1161. <p class="LinkDescription">With an example description of that link</p>
  1162. </div>
  1163. <div class="ModeCardLink Internal">
  1164. <p class="LinkDescription">With an example description of that card</p>
  1165. </div>
  1166. <div class="ModeCardLink">
  1167. <p class="LinkDescription">With an example description of that file</p>
  1168. </div>
  1169. </div>
  1170. </div>
  1171. <p>Even though I haven’t bothered to add the images to the link previews this feels like the right track. This doesn’t work as the final design, of course. But it would work as an initial sketch that can inform initial testing. Specifically, I need to do some testing to see if the conceptual model of the app is something that prospective users can figure out, what terms and labels make sense for them, that sort of thing. There’s nothing worse than testing a sketch or an idea for an UI and then figuring out afterwards that the basic design was never going to work for other reasons.</p>
  1172. <h2>This is not the final design</h2>
  1173. <p>The final design would have to be a lot less rough around the edges but an actual design for implementation needs to answer quite a few questions that this sketch doesn’t:</p>
  1174. <ul>
  1175. <li>Does it reuse the apps other, pre-existing affordances?</li>
  1176. <li>How does drag and drop work, of the card and on the card? How do you indicate draggability? Does a grab handle work?</li>
  1177. <li>Does it match the overall app’s design and UI?</li>
  1178. <li>How much does it lean on OS conventions? Web conventions?</li>
  1179. <li>Does it use rich text, markdown, syntax highlighting?</li>
  1180. <li>How do we animate behaviours and transitions?</li>
  1181. <li>How does it work with keyboard controls?</li>
  1182. <li>What does it sound like to a screen reader?</li>
  1183. <li>How do you distinguish links, cross-references, and attachments? How are they alike? How do they behave differently?</li>
  1184. <li>How are the summary-only cards different? Does having a different style for these cards work? Will it be confusing or break the user’s mental model of what’s happening?</li>
  1185. <li>Does this all make sense and fit together for the intended audience?</li>
  1186. <li>How should the card’s summary reflect the current ‘find’ text?</li>
  1187. </ul>
  1188. <p>And so many more. But this is a first step.</p>