From f4d3451dd2c82ddc6dc97f44e44fe7582e5c5a07 Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Fri, 31 Jan 2025 15:08:10 -0500 Subject: [PATCH] fix: size-down-docs-images (#6049) fix:size-down-docs-images --- docs/css/custom.css | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/docs/css/custom.css b/docs/css/custom.css index 5ab062952..4f24ebc44 100644 --- a/docs/css/custom.css +++ b/docs/css/custom.css @@ -199,8 +199,39 @@ body { width: 100%; } +/* Add comprehensive image control */ +.markdown img { + max-width: 100%; + height: auto; + display: block; + margin: 1rem auto; + max-height: 500px; + object-fit: contain; +} + +/* Default size for most images */ +.markdown img:not(.resized-image) { + max-width: 500px; + width: auto; +} + .resized-image { - width: 400px; + width: 250px; + max-height: 400px; +} + +/* Responsive images on mobile devices */ +@media (max-width: 768px) { + .markdown img:not(.resized-image) { + max-width: 100%; + max-height: 400px; + } + + .resized-image { + width: 100%; + max-width: 250px; + max-height: 300px; + } } /* Reduce width on mobile for Mendable Search */