Skip to content

Commit 23e2dad

Browse files
committed
fix switch theme button on mobile
1 parent 8a2ee61 commit 23e2dad

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/js/styles/theme.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,3 +794,15 @@ html[data-theme="dark"] .DocSearch-Button-Keys kbd {
794794
color: #e2e8f0 !important;
795795
background: #334155 !important;
796796
}
797+
798+
/* 1. Prevent the body from expanding beyond the device width */
799+
html, body {
800+
max-width: 100vw;
801+
overflow-x: hidden;
802+
}
803+
804+
/* 2. Force inline code, links, and long text to wrap on mobile */
805+
:not(pre) > code, a {
806+
overflow-wrap: break-word;
807+
word-break: break-word;
808+
}

0 commit comments

Comments
 (0)