[doc] css: add custom style for <kbd> elements

This makes them look like actual keys.
This commit is contained in:
Quantum 2022-09-18 22:48:29 -04:00 committed by Geoffrey McRae
parent 9b0af43a42
commit b6f994b511
3 changed files with 36 additions and 19 deletions

View File

@ -90,12 +90,12 @@ html_favicon = '../resources/icon.ico'
html_logo = '../resources/icon-128x128.png'
html_css_files = [
'center-rtd.css',
'lg-custom.css',
]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = [
'css/center-rtd.css',
'css/',
]

View File

@ -1,17 +0,0 @@
@media screen and (min-width:1100px) {
.wy-nav-content-wrap {
margin-left: auto;
}
.wy-nav-content {
margin: auto;
}
}
@media screen and (min-width:769px) and (max-width:1420px) {
.wy-nav-content-wrap {
margin-left: 300px;
}
.wy-nav-content {
margin: 0;
}
}

34
doc/css/lg-custom.css Normal file
View File

@ -0,0 +1,34 @@
/* Center content in the RTD theme */
@media screen and (min-width: 1100px) {
.wy-nav-content-wrap {
margin-left: auto;
}
.wy-nav-content {
margin: auto;
}
}
@media screen and (min-width:769px) and (max-width:1420px) {
.wy-nav-content-wrap {
margin-left: 300px;
}
.wy-nav-content {
margin: 0;
}
}
/* Make <kbd> look like a key */
kbd {
background-color: #eee;
border-radius: 3px;
border: 1px solid #b4b4b4;
box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
color: #333;
display: inline-block;
font-size: .85em;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}