Update admonition styling

Co-authored-by: Justin McGettigan <jwmcgettigan@gmail.com>
This commit is contained in:
Yuri Sizov
2023-03-01 16:09:59 +01:00
parent fb93c04226
commit f45c014fb1
3 changed files with 9 additions and 5 deletions

View File

@@ -938,14 +938,19 @@ code,
/* Admonition tweaks */
.rst-content .admonition-grid {
display: grid;
grid-template-columns: 4fr 5fr;
grid-template-columns: 1fr;
gap: 20px;
}
.rst-content .admonition-grid-2x {
grid-template-columns: 4fr 5fr;
}
@media screen and (max-width: 1020px) {
.rst-content .admonition-grid {
grid-template-columns: 1fr;
gap: 12px;
}
.rst-content .admonition-grid-2x {
grid-template-columns: 1fr;
}
}
.rst-content .admonition,
@@ -967,7 +972,6 @@ code,
font-size: 105%;
line-height: 120%;
padding: 6px 16px;
text-align: right;
}
.rst-content .admonition .admonition-title:before {

View File

@@ -27,7 +27,7 @@
{%- block document %}
<div itemprop="articleBody">
{% if godot_is_latest or godot_show_article_status %}
<div class="admonition-grid">
<div class="admonition-grid {% if godot_is_latest and godot_show_article_status %}admonition-grid-2x{% endif %}">
{% if godot_is_latest %}
<div class="admonition attention latest-notice">
<p class="first admonition-title">Attention</p>

View File

@@ -195,7 +195,7 @@ html_extra_path = ["robots.txt"]
html_css_files = [
'css/algolia.css',
'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css',
"css/custom.css?8", # Increment the number at the end when the file changes to bust the cache.
"css/custom.css?9", # Increment the number at the end when the file changes to bust the cache.
]
if not on_rtd: