From a71d8ecb69ec83de0e4128980ffc4095fc12c7ff Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 28 Apr 2021 17:57:58 -0400 Subject: [PATCH 1/2] Docs: PyAPI: More specific css selector for long enums Fixes T87008 --- doc/python_api/static/css/theme_overrides.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python_api/static/css/theme_overrides.css b/doc/python_api/static/css/theme_overrides.css index c237a958f5f..61c62ad21b6 100644 --- a/doc/python_api/static/css/theme_overrides.css +++ b/doc/python_api/static/css/theme_overrides.css @@ -1,5 +1,5 @@ /* T76453: Prevent Long enum lists */ -.field-list li { +.field-list > dd > p { max-height: 245px; overflow-y: auto !important; } From 48bbeaf38304c7b84c67fbd575086593b628cf96 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 28 Apr 2021 18:25:47 -0400 Subject: [PATCH 2/2] Docs: PyAPI: Improve website responsiveness on narrow displays - Allow long enums to break early - Allow long titles to wrap - Colloapse hlist to few collumns if needed This fixes a few of the bigger issues, some more tweaks are still needed in some places --- doc/python_api/static/css/theme_overrides.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/python_api/static/css/theme_overrides.css b/doc/python_api/static/css/theme_overrides.css index 61c62ad21b6..38436510655 100644 --- a/doc/python_api/static/css/theme_overrides.css +++ b/doc/python_api/static/css/theme_overrides.css @@ -2,6 +2,7 @@ .field-list > dd > p { max-height: 245px; overflow-y: auto !important; + word-break: break-word; } /* Hide home icon in search area */ @@ -11,3 +12,15 @@ .wy-nav-content { max-width: 1000px !important; } + +/* Fix long titles on mobile */ +h1, h2, h3, h4, h5, h6 {word-break: break-all} + +/* Temp fix for https://github.com/readthedocs/sphinx_rtd_theme/pull/1109 */ +.hlist tr { + display: -ms-flexbox; + display: flex; + flex-flow: row wrap; + } + +.hlist td {margin-right: auto}