🐛 Fix alert overflow when it contains a code block

The alert text span is a flex item with the default min-width: auto,
so it cannot shrink below its widest child. A code block or table in
an alert ran past the alert box, and on phones made the page wider
than the screen.

Add min-w-0 to the text span in both the default and textColor
branches so wide content scrolls inside the alert.
This commit is contained in:
Khadirullah Mohammad committed 2026-10-13 14:39:00 +05:30
1 parent ebe683e9c2
commit 680b395c4a
1 file changed
+2 -2
+2 -2
View File
@@ -27,9 +27,9 @@
<span
{{ if not ($.Scratch.Get "textColor") }}
class="dark:text-neutral-300"
class="min-w-0 dark:text-neutral-300"
{{ else }}
style="color: {{ $.Scratch.Get "textColor" }}"
class="min-w-0" style="color: {{ $.Scratch.Get "textColor" }}"
{{ end }}
>
{{- .Inner | markdownify -}}