Skip to content

Commit f45c014

Browse files
Update admonition styling
Co-authored-by: Justin McGettigan <[email protected]>
1 parent fb93c04 commit f45c014

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

_static/css/custom.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,14 +938,19 @@ code,
938938
/* Admonition tweaks */
939939
.rst-content .admonition-grid {
940940
display: grid;
941-
grid-template-columns: 4fr 5fr;
941+
grid-template-columns: 1fr;
942942
gap: 20px;
943943
}
944+
.rst-content .admonition-grid-2x {
945+
grid-template-columns: 4fr 5fr;
946+
}
944947
@media screen and (max-width: 1020px) {
945948
.rst-content .admonition-grid {
946-
grid-template-columns: 1fr;
947949
gap: 12px;
948950
}
951+
.rst-content .admonition-grid-2x {
952+
grid-template-columns: 1fr;
953+
}
949954
}
950955

951956
.rst-content .admonition,
@@ -967,7 +972,6 @@ code,
967972
font-size: 105%;
968973
line-height: 120%;
969974
padding: 6px 16px;
970-
text-align: right;
971975
}
972976

973977
.rst-content .admonition .admonition-title:before {

_templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{%- block document %}
2828
<div itemprop="articleBody">
2929
{% if godot_is_latest or godot_show_article_status %}
30-
<div class="admonition-grid">
30+
<div class="admonition-grid {% if godot_is_latest and godot_show_article_status %}admonition-grid-2x{% endif %}">
3131
{% if godot_is_latest %}
3232
<div class="admonition attention latest-notice">
3333
<p class="first admonition-title">Attention</p>

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
html_css_files = [
196196
'css/algolia.css',
197197
'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css',
198-
"css/custom.css?8", # Increment the number at the end when the file changes to bust the cache.
198+
"css/custom.css?9", # Increment the number at the end when the file changes to bust the cache.
199199
]
200200

201201
if not on_rtd:

0 commit comments

Comments
 (0)