Skip to content

Commit 88f5636

Browse files
committed
File list: Soften selection text-color flip with a 50ms transition
Selecting/deselecting a row now fades the text color over 50ms instead of snapping. Applied to every cell whose color responds to selection in both Brief and Full lists. Honors `prefers-reduced-motion: reduce`.
1 parent e9aec7b commit 88f5636

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

apps/desktop/src/lib/file-explorer/views/BriefList.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,14 @@
782782
overflow: hidden;
783783
text-overflow: ellipsis;
784784
white-space: nowrap;
785+
/* Soften the selection color flip. */
786+
transition: color 50ms ease;
787+
}
788+
789+
@media (prefers-reduced-motion: reduce) {
790+
.name {
791+
transition: none;
792+
}
785793
}
786794
787795
.file-entry.is-selected .name {

apps/desktop/src/lib/file-explorer/views/FullList.svelte

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,35 @@
840840
transition: none;
841841
}
842842
843+
/* Soften the selection/cursor color flip on the cells whose color changes. */
844+
.file-entry .col-name,
845+
.file-entry .col-ext,
846+
.file-entry .col-size,
847+
.file-entry .col-date,
848+
.file-entry .col-git,
849+
.file-entry .size-dir,
850+
.file-entry :global(.size-bytes),
851+
.file-entry :global(.size-kb),
852+
.file-entry :global(.size-mb),
853+
.file-entry :global(.size-gb),
854+
.file-entry :global(.size-tb) {
855+
transition: color 50ms ease;
856+
}
857+
843858
@media (prefers-reduced-motion: reduce) {
844859
.header-row,
845-
.file-entry {
860+
.file-entry,
861+
.file-entry .col-name,
862+
.file-entry .col-ext,
863+
.file-entry .col-size,
864+
.file-entry .col-date,
865+
.file-entry .col-git,
866+
.file-entry .size-dir,
867+
.file-entry :global(.size-bytes),
868+
.file-entry :global(.size-kb),
869+
.file-entry :global(.size-mb),
870+
.file-entry :global(.size-gb),
871+
.file-entry :global(.size-tb) {
846872
transition: none;
847873
}
848874
}

0 commit comments

Comments
 (0)