Skip to content

Commit

Permalink
[doc] css: add custom style for <kbd> elements
Browse files Browse the repository at this point in the history
This makes them look like actual keys.
  • Loading branch information
quantum5 authored and gnif committed Sep 19, 2022
1 parent 9b0af43 commit b6f994b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 19 deletions.
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@
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/',
]
17 changes: 0 additions & 17 deletions doc/css/center-rtd.css

This file was deleted.

34 changes: 34 additions & 0 deletions doc/css/lg-custom.css
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit b6f994b

Please sign in to comment.