tui: show monochrome file icons by default in tree view, revealing colors on hover to reduce visual clutter and help users focus on code content
This commit is contained in:
@@ -3,3 +3,35 @@
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
/*
|
||||
File tree: show monochrome weak icons by default.
|
||||
On hover, show the original file-type colors.
|
||||
*/
|
||||
[data-component="filetree"] .filetree-icon--mono {
|
||||
color: var(--icon-base);
|
||||
}
|
||||
|
||||
[data-component="filetree"] .filetree-iconpair {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
[data-component="filetree"] .filetree-iconpair [data-component="file-icon"] {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
[data-component="filetree"] .filetree-iconpair .filetree-icon--color {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
[data-component="filetree"]:hover .filetree-iconpair .filetree-icon--color {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
[data-component="filetree"]:hover .filetree-iconpair .filetree-icon--mono {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user