Skip to content

Commit

Permalink
Fix serving of dartdoc's search.svg. (dart-lang#8468)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Jan 16, 2025
1 parent 77da838 commit 3acb30b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/pub_integration/lib/src/test_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,6 @@ class TestBrowserSession {
await rq.continueRequest();
return;
}
// TODO: this file is missing, we may need to fix it in the dartdoc stylesheet
if (rq.url.endsWith('/css/search.svg')) {
await rq.respond(
status: 200,
body: '',
contentType: 'image/svg+xml',
headers: {'Cache-Control': 'public, max-age=604800'},
);
return;
}

final uri = Uri.parse(rq.url);
if (uri.path.contains('//')) {
Expand Down
5 changes: 5 additions & 0 deletions pkg/web_css/lib/dartdoc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@
.light-theme .markdown-body pre {
background-color: #f6f8fa;
}

/* Note: override for the image path, as the dartdoc.css is served from /static/hash-<hash>/css/ */
input.typeahead {
background-image: url('../dartdoc/resources/search.svg');
}

0 comments on commit 3acb30b

Please sign in to comment.