Only set selected background on path details

Previously the background of the entire li was
changed when selected.
This commit is contained in:
Kevin Sawicki
2013-02-13 22:30:19 -08:00
parent 2d4ea98c0a
commit cc10ae4bdb
3 changed files with 9 additions and 6 deletions

View File

@@ -9,8 +9,9 @@ class PathView extends View
classes = ['path']
classes.push('readme') if fs.isReadmePath(path)
@li class: classes.join(' '), =>
@span class: 'path-name', path
@span "(#{operations.length})", class: 'path-match-number'
@div class: 'path-details', =>
@span class: 'path-name', path
@span "(#{operations.length})", class: 'path-match-number'
@ul outlet: 'matches', class: 'matches', =>
for operation in operations
@subview "operation#{operation.index}", new OperationView({operation, previewList})

View File

@@ -50,7 +50,7 @@
-webkit-user-select: none;
}
.command-panel .preview-list .path:before {
.command-panel .preview-list .path-details:before {
font-family: 'Octicons Regular';
font-size: 12px;
width: 12px;
@@ -62,7 +62,7 @@
top: 0;
}
.command-panel .preview-list .path.is-collapsed:before {
.command-panel .preview-list .is-collapsed .path-details:before {
content: "\f05a";
}

View File

@@ -51,11 +51,13 @@
color: #fff;
}
.command-panel .preview-list li.selected {
.command-panel .preview-list .path.selected .path-details,
.command-panel .preview-list li.operation.selected {
background-color: rgba(255, 255, 255, 0.05);
}
.command-panel .preview-list:focus li.selected {
.command-panel .preview-list:focus .path.selected .path-details,
.command-panel .preview-list:focus li.operation.selected {
background-color: rgba(255, 255, 255, 0.05);
}