diff --git a/public/components/views/search/search.css b/public/components/views/search/search.css index 36f02c3c..aefdbc68 100644 --- a/public/components/views/search/search.css +++ b/public/components/views/search/search.css @@ -73,6 +73,10 @@ padding-left: 5px; } +.result.exact { + background: #f4fff2 !important; +} + .result:nth-child(even) { box-shadow: 1px 1px 10px #33333314 inset; } diff --git a/public/components/views/search/search.js b/public/components/views/search/search.js index 627075bd..e2ad6551 100644 --- a/public/components/views/search/search.js +++ b/public/components/views/search/search.js @@ -81,6 +81,9 @@ export class SearchView { for (const { name, version, description } of result) { const divResultElement = document.createElement("div"); divResultElement.classList.add("result"); + if (packageName === name) { + divResultElement.classList.add("exact"); + } const pkgElement = document.createElement("div"); pkgElement.classList.add("package-result");