Skip to content

Commit a084f24

Browse files
committed
Use primer variables for color selection and make sure that the highlighting works in Safari as well
1 parent c420ae5 commit a084f24

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

app/components/primer/open_project/tree_view.pcss

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
}
214214
}
215215

216-
&[aria-disabled='true'] {
216+
&[aria-disabled="true"] {
217217
pointer-events: none;
218218

219219
& .TreeViewItemContentText {
@@ -245,20 +245,23 @@
245245
}
246246

247247
& ::highlight(primer-filterable-tree-view-search-results) {
248-
background-color: yellow;
249-
color: black;
248+
background-color: var(--label-yellow-bgColor-active);
249+
color: var(--fgColor-default);
250250
}
251251

252252
& mark {
253-
background-color: yellow;
254-
color: black;
253+
background-color: var(--label-yellow-bgColor-active);
254+
color: var(--fgColor-default);
255255
}
256256
}
257257

258258
& .TreeViewItemContentText {
259259
color: var(--control-fgColor-rest);
260260
flex: 1 1 auto;
261261
width: 0;
262+
// Do not remove, as otherwise the filter result of the filterableTreeView will not be shown in Safari
263+
// see: https://bugs.webkit.org/show_bug.cgi?id=278455
264+
-webkit-user-select: auto;
262265
}
263266

264267
&:where([data-truncate-text='true']) .TreeViewItemContentText {

0 commit comments

Comments
 (0)