Skip to content

Commit a5e3893

Browse files
committed
refactor(docs): add search bar shortcut slash icon
1 parent 2978290 commit a5e3893

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/stylesheets/extra.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@
128128
border-color: var(--md-primary-fg-color, #6200ee);
129129
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
130130
}
131+

docs/stylesheets/extra_mkdocs.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*https://github.com/squidfunk/mkdocs-material/issues/2574#issuecomment-821979698*/
2+
[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after {
3+
position: absolute;
4+
top: .3rem;
5+
right: .3rem;
6+
display: block;
7+
padding: .1rem .4rem;
8+
color: var(--md-default-bg-color);
9+
font-weight: bold;
10+
font-size: .8rem;
11+
border: .05rem solid var(--md-default-bg-color--lighter);
12+
border-radius: .1rem;
13+
content: "/";
14+
}
15+
16+
.md-typeset h1 {
17+
margin: 0 0 0.1em;
18+
}

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ theme:
4848
extra_css:
4949
- 'stylesheets/extra.css'
5050
- 'stylesheets/landing.css'
51+
- 'stylesheets/extra_mkdocs.css'
5152

5253
extra_javascript:
5354
- javascripts/mathjax.js

0 commit comments

Comments
 (0)