From 27fc082a12773a89d38f92699b27bb7e96369aa7 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Sun, 17 Apr 2022 11:46:33 +0700 Subject: [PATCH 1/4] web: Add min-height to iframe --- web/src/giscus.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/giscus.ts b/web/src/giscus.ts index 874121e5..7f769f20 100644 --- a/web/src/giscus.ts +++ b/web/src/giscus.ts @@ -25,6 +25,7 @@ export class GiscusWidget extends LitElement { width: 100%; border: none; color-scheme: normal; + min-height: 150px; } `; From 76dd168088a96fce8878a61155379b784ce57e46 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Sun, 17 Apr 2022 12:08:51 +0700 Subject: [PATCH 2/4] web: Add part="iframe" to iframe element --- web/src/giscus.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/giscus.ts b/web/src/giscus.ts index 7f769f20..9b15eb4f 100644 --- a/web/src/giscus.ts +++ b/web/src/giscus.ts @@ -309,6 +309,7 @@ export class GiscusWidget extends LitElement { ${ref(this._iframeRef)} src=${this.getIframeSrc()} loading=${this.loading} + part="iframe" > `; } From 689cb582881c8c8f14b1c8349d3cc93eba16ebc4 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Sun, 17 Apr 2022 12:25:44 +0700 Subject: [PATCH 3/4] web: Customize dev page styles --- web/index.html | 55 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/web/index.html b/web/index.html index 8e55e11d..90999558 100644 --- a/web/index.html +++ b/web/index.html @@ -6,23 +6,44 @@ Vite + Lit App + - - -

Loading comments...

-
+ +
+ +

Loading comments...

+
+
From 7dce3edaf05a07945819f9f9e38575af08232316 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Sun, 17 Apr 2022 12:26:01 +0700 Subject: [PATCH 4/4] common: Document how to style the iframe --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/README.md b/README.md index 4ca649af..f8bf7013 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,51 @@ The attribute names are the same as the `data-` attributes shown on the [giscus website][giscus], but written in lowercase with the `data-` prefix and dashes removed. +### Changing the `