Skip to content

Commit

Permalink
Update admonition styling
Browse files Browse the repository at this point in the history
Co-authored-by: Justin McGettigan <jwmcgettigan@gmail.com>
(cherry picked from commit f45c014)
  • Loading branch information
YuriSizov committed Mar 1, 2023
1 parent 2ecd9b6 commit e931220
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions _static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -967,7 +972,6 @@ code,
font-size: 105%;
line-height: 120%;
padding: 6px 16px;
text-align: right;
}

.rst-content .admonition .admonition-title:before {
Expand Down
2 changes: 1 addition & 1 deletion _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
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:
Expand Down

0 comments on commit e931220

Please sign in to comment.