Skip to content

Commit 52b0293

Browse files
authored
Slightly different style for name matches. (#8162)
1 parent 9f75e64 commit 52b0293

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

app/lib/frontend/templates/listing.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,14 @@ d.Node? _nameMatches(SearchForm form, List<String>? matches) {
135135
: 'Matching package ${singular ? 'name' : 'names'}: ';
136136

137137
return d.p(children: [
138-
d.b(text: nameMatchLabel),
138+
d.text(nameMatchLabel),
139139
...matches.expandIndexed((i, name) {
140140
return [
141141
if (i > 0) d.text(', '),
142-
d.code(child: d.a(href: urls.pkgPageUrl(name), text: name)),
142+
d.a(
143+
href: urls.pkgPageUrl(name),
144+
child: d.b(text: name),
145+
),
143146
];
144147
}),
145148
]);

app/lib/frontend/templates/views/pkg/index.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ d.Node packageListingNode({
2020
}) {
2121
final innerContent = d.fragment([
2222
listingInfo,
23-
if (nameMatches != null) nameMatches,
23+
if (nameMatches != null)
24+
d.div(classes: ['listing-highlight-block'], child: nameMatches),
2425
packageList,
2526
if (pagination != null) pagination,
2627
d.markdown('Check our help page for details on '

pkg/web_css/lib/src/_list.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
}
4545
}
4646

47+
.listing-highlight-block {
48+
margin: 8px 0px;
49+
}
50+
4751
.sort-control {
4852
position: relative;
4953
cursor: pointer;

0 commit comments

Comments
 (0)