mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-25 06:38:09 -05:00
HTML search: adjustments to type-dependent CSS classnames and defaults (#12815)
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
This commit is contained in:
1 parent
bce70daf21
commit
92f024e2bf
3 files changed
+35
-24
No files matched your search
@@ -238,16 +238,25 @@ Styling search result entries by category
|
||||
|
||||
.. versionadded:: 8.0
|
||||
|
||||
.. note::
|
||||
|
||||
The CSS classes named below are generated by Sphinx's standalone search
|
||||
code. If you are using a third-party search provider, such as
|
||||
ReadTheDocs_, to provide search results, then the theming options available
|
||||
may vary.
|
||||
|
||||
.. _ReadTheDocs: https://docs.readthedocs.io/
|
||||
|
||||
The search result items have classes indicating the context in which the
|
||||
search term was found. You can use the CSS selectors:
|
||||
|
||||
- ``ul.search li.context-index``:
|
||||
- ``ul.search li.kind-index``:
|
||||
For results in an index, such as the glossary
|
||||
- ``ul.search li.context-object``:
|
||||
- ``ul.search li.kind-object``:
|
||||
For results in source code, like Python function definitions
|
||||
- ``ul.search li.context-title``:
|
||||
- ``ul.search li.kind-title``:
|
||||
For results found in section headings
|
||||
- ``ul.search li.context-text``:
|
||||
- ``ul.search li.kind-text``:
|
||||
For results found anywhere else in the documentation text
|
||||
|
||||
As a base for inheritance by other themes, the ``basic`` theme is
|
||||
@@ -265,16 +274,16 @@ search result list:
|
||||
padding: 5px 0 5px 10px;
|
||||
list-style-type: "\25A1"; /* Unicode: White Square */
|
||||
}
|
||||
ul.search li.context-index {
|
||||
ul.search li.kind-index {
|
||||
list-style-type: "\1F4D1"; /* Unicode: Bookmark Tabs */
|
||||
}
|
||||
ul.search li.context-object {
|
||||
ul.search li.kind-object {
|
||||
list-style-type: "\1F4E6"; /* Unicode: Package */
|
||||
}
|
||||
ul.search li.context-title {
|
||||
ul.search li.kind-title {
|
||||
list-style-type: "\1F4C4"; /* Unicode: Page Facing Up */
|
||||
}
|
||||
ul.search li.context-text {
|
||||
ul.search li.kind-text {
|
||||
list-style-type: "\1F4C4"; /* Unicode: Page Facing Up */
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user