Skip to content

Commit 1bf1ded

Browse files
authored
Merge pull request #21304 from cockroachdb/fix/widget-modal-positioning
Fix widget modal positioning to avoid header overlap
2 parents 029a362 + 7ee4fc6 commit 1bf1ded

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/current/_includes/head.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
data-kapa-branding-hide="true"
152152
data-modal-title="CockroachDB AI"
153153
data-modal-disclaimer="This AI bot is experimental. Don't rely on it for production workloads. Always consult the official CockroachDB documentation. Interactions with this AI bot may be monitored or recorded, and your use of the AI bot is subject to the Cockroach Labs' [Terms of Use](https://www.cockroachlabs.com/website-terms-of-use/) and [Privacy policy](https://www.cockroachlabs.com/privacy/)."
154+
data-modal-y-offset="12vh"
155+
data-modal-z-index="1000"
154156
></script>
155157

156158
<style>
@@ -160,4 +162,19 @@
160162
.mantine-Modal-content {
161163
max-height: calc(75vh); /* Limits the modal's height to 75% of the viewport height */
162164
}
165+
166+
/* Responsive modal positioning for Kapa widget */
167+
@media (max-width: 768px) {
168+
.mantine-Modal-content {
169+
margin-top: 60px !important; /* Reduced margin for mobile */
170+
max-height: calc(85vh); /* More height available on mobile */
171+
}
172+
}
173+
174+
@media (max-width: 480px) {
175+
.mantine-Modal-content {
176+
margin-top: 40px !important; /* Even smaller margin for small mobile screens */
177+
max-height: calc(90vh); /* Maximum height utilization on small screens */
178+
}
179+
}
163180
</style>

0 commit comments

Comments
 (0)