Skip to content
This repository was archived by the owner on Aug 25, 2018. It is now read-only.

Commit b9bf584

Browse files
authored
Merge pull request #132 from atom/sm-sticky-fix
Fix selected item not visible when using arrow up key
2 parents 107adc4 + 772a888 commit b9bf584

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

styles/config.less

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,22 @@
127127
background: @button-background-color-selected;
128128
}
129129

130-
// Fix sticky header from covering auto-revealed items
131-
.list-item.selected {
130+
// Fix sticky header from covering auto-revealed files
131+
.entry.file.selected {
132132
padding-top: @ui-tab-height;
133133
margin-top: -@ui-tab-height;
134134
}
135+
136+
// Fix sticky header from covering auto-revealed directories when using up/down keys
137+
// for directories, scroll test moves to .header, see https://github.com/atom/tree-view/blob/d2857ad4d7eeb7dad5cf94b33257a8740211480e/lib/tree-view.coffee#L839
138+
.entry.directory.selected:not(.project-root) {
139+
& > .header {
140+
padding-top: @ui-tab-height;
141+
margin-top: -@ui-tab-height;
142+
}
143+
&::before {
144+
margin-top: @ui-tab-height;
145+
}
146+
}
135147
}
136148
}

0 commit comments

Comments
 (0)