Skip to content

Commit 4438333

Browse files
committed
fix: force mobile viewport by preventing horizontal overflow
- Remove content-visibility from Giscus which could affect layout calculations - Add overflow-x: hidden to html and body to strictly contain the viewport width
1 parent dee9669 commit 4438333

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

20260223_125912 pickpick.png

38 KB
Loading

src/components/Giscus.astro

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,7 @@ import { giscus } from "../site.config";
255255
</script>
256256
<style>
257257
.giscus {
258-
content-visibility: auto;
259-
contain-intrinsic-size: 100% 400px;
260-
}
261-
262-
.giscus.giscus-loaded {
263-
contain-intrinsic-size: auto;
258+
min-height: 400px;
264259
}
265260

266261
.giscus .giscus-frame {

src/styles/global.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@
3939
@layer base {
4040
html {
4141
scroll-behavior: smooth;
42+
overflow-x: hidden;
4243
}
4344

4445
body {
4546
@apply bg-[var(--color-bg)] text-[var(--color-text)] font-sans antialiased;
4647
max-width: 100%;
48+
overflow-x: hidden;
4749
transition:
4850
background-color 0.2s ease,
4951
color 0.2s ease;

0 commit comments

Comments
 (0)