fix code block width - use min(72vw, 900px) to handle both narrow and wide viewports

This commit is contained in:
Russell Ballestrini 2025-10-11 09:19:25 -04:00
parent 202e877b34
commit 90645cc899
2 changed files with 4 additions and 4 deletions

View file

@ -1122,11 +1122,11 @@ dialog#uncloseai-embedded-modal[data-theme="dark"] .uncloseai-chat-box {
/* Code blocks within AI messages - allow horizontal scroll, preserve all whitespace */
.ai-message pre {
overflow-x: auto;
max-width: 72vw;
max-width: min(72vw, 900px);
}
.ai-message code {
max-width: 72vw;
max-width: min(72vw, 900px);
}
/* Mobile: use viewport units since modal is fullscreen */

View file

@ -1195,11 +1195,11 @@ dialog#uncloseai-embedded-modal[data-theme="dark"] .uncloseai-chat-box {
/* Code blocks within AI messages - allow horizontal scroll, preserve all whitespace */
.ai-message pre {
overflow-x: auto;
max-width: 72vw;
max-width: min(72vw, 900px);
}
.ai-message code {
max-width: 72vw;
max-width: min(72vw, 900px);
}
/* Mobile: use viewport units since modal is fullscreen */