Skip to content

Commit db89a74

Browse files
author
ebembi-crdb
committed
Make widget modal positioning responsive for mobile devices
- Reduce data-modal-y-offset from 18vh to 12vh for better mobile experience - Add responsive CSS media queries for different screen sizes - Mobile (≤768px): 60px margin-top, 85vh max-height - Small mobile (≤480px): 40px margin-top, 90vh max-height
1 parent 770fa08 commit db89a74

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/current/_includes/head.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
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="18vh"
154+
data-modal-y-offset="12vh"
155155
data-modal-z-index="1000"
156156
></script>
157157

@@ -162,4 +162,19 @@
162162
.mantine-Modal-content {
163163
max-height: calc(75vh); /* Limits the modal's height to 75% of the viewport height */
164164
}
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+
}
165180
</style>

0 commit comments

Comments
 (0)