From f45c014fb1764299297772e58d941cd604ce582f Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 1 Mar 2023 16:09:59 +0100 Subject: [PATCH] Update admonition styling Co-authored-by: Justin McGettigan --- _static/css/custom.css | 10 +++++++--- _templates/layout.html | 2 +- conf.py | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/_static/css/custom.css b/_static/css/custom.css index e57417de6..ac77f2062 100644 --- a/_static/css/custom.css +++ b/_static/css/custom.css @@ -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 { diff --git a/_templates/layout.html b/_templates/layout.html index 6f566c053..2ecffa5c4 100644 --- a/_templates/layout.html +++ b/_templates/layout.html @@ -27,7 +27,7 @@ {%- block document %}
{% if godot_is_latest or godot_show_article_status %} -
+
{% if godot_is_latest %}

Attention

diff --git a/conf.py b/conf.py index ad07d7af9..7d93747f3 100644 --- a/conf.py +++ b/conf.py @@ -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: