From b6f994b5119d58f09bd38143a88cb85d9f778089 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 18 Sep 2022 22:48:29 -0400 Subject: [PATCH] [doc] css: add custom style for elements This makes them look like actual keys. --- doc/conf.py | 4 ++-- doc/css/center-rtd.css | 17 ----------------- doc/css/lg-custom.css | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 19 deletions(-) delete mode 100644 doc/css/center-rtd.css create mode 100644 doc/css/lg-custom.css diff --git a/doc/conf.py b/doc/conf.py index 29b043ac..5d3e87d7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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/', ] diff --git a/doc/css/center-rtd.css b/doc/css/center-rtd.css deleted file mode 100644 index 9b07fa88..00000000 --- a/doc/css/center-rtd.css +++ /dev/null @@ -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; - } -} diff --git a/doc/css/lg-custom.css b/doc/css/lg-custom.css new file mode 100644 index 00000000..9f03ac49 --- /dev/null +++ b/doc/css/lg-custom.css @@ -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 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; +}