Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Selection as macOS draws it: accent with white text while the list has focus, grey once focus is elsewhere (Notes, Contacts, Drive)

Yashwanth Kamireddi74e82a4c1599
diff --git a/src/styles/app.css b/src/styles/app.css
index 26ec183..5e7a138 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -866,7 +866,10 @@
}
.contact-row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
-.contact-row[aria-current="true"] { background: var(--gold-tint); }
+/* As macOS selects: the accent with white text while the list has focus, grey after. */
+.contact-row[aria-current="true"] { background: color-mix(in srgb, var(--text) 11%, transparent); }
+.contact-rows:focus-within .contact-row[aria-current="true"] { background: var(--gold); color: #fff; }
+.contact-rows:focus-within .contact-row[aria-current="true"] .avatar:not(:has(img)) { background: rgba(255, 255, 255, 0.28); color: #fff; }
.contact-row:focus-visible { outline: 3px solid var(--gold-ring); outline-offset: -1px; }
.contact-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@@ -1791,6 +1794,12 @@
.drive-row.is-selected .drive-name, .drive-row.is-selected .drive-meta { color: #fff; }
.drive-rows.is-grid .drive-row.is-selected { background: color-mix(in srgb, var(--sys-blue, #0a84ff) 28%, transparent); box-shadow: inset 0 0 0 2px var(--sys-blue, #0a84ff); }
.drive-rows.is-grid .drive-row.is-selected .drive-name { color: var(--text); }
+/* With focus elsewhere the selection stays, quietly — grey, the text its own colour. */
+.drive-rows:not(.is-grid):not(:focus-within) .drive-row.is-selected { background: color-mix(in srgb, var(--text) 11%, transparent); }
+.drive-rows:not(.is-grid):not(:focus-within) .drive-row.is-selected .drive-name { color: var(--text); }
+.drive-rows:not(.is-grid):not(:focus-within) .drive-row.is-selected .drive-meta { color: var(--text-2); }
+.drive-rows:not(.is-grid):not(:focus-within) .drive-row.is-selected .drive-more { color: var(--text); }
+.drive-rows:not(.is-grid):not(:focus-within) .drive-row.is-selected .drive-badge > svg { filter: none; }
/* Apple's own picture of a file: small in a list, the tile's face in Grid, as icloud.com. */
.drive-thumb { width: 22px; height: 22px; object-fit: contain; border-radius: 3px; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.25); background: #fff; }
.drive-rows.is-grid .drive-badge:has(.drive-thumb) { transform: none; height: 76px; }
diff --git a/src/styles/notes.css b/src/styles/notes.css
index 4ddd0bd..2a714fd 100644
--- a/src/styles/notes.css
+++ b/src/styles/notes.css
@@ -151,7 +151,12 @@
border-radius: 0 0 8px 8px;
}
.note-row:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
-.note-row[aria-current="true"] { background: color-mix(in srgb, var(--gold) 26%, transparent); box-shadow: none; }
+/* The selection as macOS draws it: the accent, text in white, while the list has focus;
+ a quiet grey once focus is elsewhere — in the note being written, say. */
+.note-row[aria-current="true"] { background: color-mix(in srgb, var(--text) 11%, transparent); box-shadow: none; }
+.note-rows:focus-within .note-row[aria-current="true"] { background: var(--gold); color: #fff; }
+.note-rows:focus-within .note-row[aria-current="true"] .note-row-when,
+.note-rows:focus-within .note-row[aria-current="true"] .note-row-snippet { color: rgba(255, 255, 255, 0.82); }
.note-row:focus-visible { outline: 3px solid var(--gold-ring); outline-offset: -1px; }
.note-row-title {
overflow: hidden;