From 53e2ad512ca9212203002fdfd55176b9e4cbff4c Mon Sep 17 00:00:00 2001 From: Benson Su Date: Thu, 19 Mar 2026 10:48:18 +0800 Subject: [PATCH 1/8] fix: scss color Ported from tmp/0726 f3f587e --- assets/css/components/carousel.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/css/components/carousel.scss b/assets/css/components/carousel.scss index 12c1b45..3fa50be 100644 --- a/assets/css/components/carousel.scss +++ b/assets/css/components/carousel.scss @@ -59,13 +59,13 @@ img.reload { font-weight: 600; &:hover { - background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 1); } &:focus { padding: 4px; border: 2px solid #fff; - background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 1); outline: none; color: #fff; } @@ -80,7 +80,7 @@ img.reload { border: 0 solid transparent; &:hover { - background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 1); } } From 1c8142283125fb0684a0d9575b0795be4362faa4 Mon Sep 17 00:00:00 2001 From: Benson Su Date: Thu, 19 Mar 2026 10:48:52 +0800 Subject: [PATCH 2/8] fix : Deprecation Warning: Sass's behavior for declarations that appear after nested rules will be changing to match the behavior specified by CSS in an upcoming version. To keep the existing behavior, move the declaration above the nested rule. To opt into the new behavior, wrap the declaration in `& {}`. Ported from tmp/0726 cbb8f77 --- assets/css/reset.scss | 2 +- assets/css/typography.scss | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/assets/css/reset.scss b/assets/css/reset.scss index d0eb51b..75611de 100644 --- a/assets/css/reset.scss +++ b/assets/css/reset.scss @@ -4,11 +4,11 @@ *:not(article) { > h1, > h2, > h3, > h4, > h5, > h6 { + margin: 0; &:not(article &) { font-size: inherit; } - margin: 0; } } diff --git a/assets/css/typography.scss b/assets/css/typography.scss index d373dc6..c338d43 100644 --- a/assets/css/typography.scss +++ b/assets/css/typography.scss @@ -1,22 +1,6 @@ @import 'utilities/px-to-rem'; :root { - &:lang(zh) { - --body-font-family: helvetica, 'Noto Sans TC', system-ui, sans-serif; - } - &:lang(en) { - --body-font-family: helvetica, system-ui, sans-serif; - } - &:lang(ja) { - --body-font-family: helvetica, 'Noto Sans JP', system-ui, sans-serif; - } - &:lang(th) { - --body-font-family: helvetica, 'Noto Sans Thai', system-ui, sans-serif; - } - &:lang(vi) { - --body-font-family: inter, system-ui, sans-serif; - } - --body-line-height: 1.7em; --body-font-size: #{px-to-rem(16px)}; @@ -44,6 +28,22 @@ --h1-font-size: #{px-to-rem(36px)}; --h1-font-weight: 600; + + &:lang(zh) { + --body-font-family: helvetica, 'Noto Sans TC', system-ui, sans-serif; + } + &:lang(en) { + --body-font-family: helvetica, system-ui, sans-serif; + } + &:lang(ja) { + --body-font-family: helvetica, 'Noto Sans JP', system-ui, sans-serif; + } + &:lang(th) { + --body-font-family: helvetica, 'Noto Sans Thai', system-ui, sans-serif; + } + &:lang(vi) { + --body-font-family: inter, system-ui, sans-serif; + } } a { From d3449128f60ff0b3f51f64087c89793758f8747c Mon Sep 17 00:00:00 2001 From: Benson Su Date: Thu, 19 Mar 2026 10:55:04 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=E4=B8=8B=E4=B8=80=E6=AD=A5=20i18n?= =?UTF-8?q?=20in=20en,=20"cancel"=20to=20"next"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ported from tmp/0726 91d6761 --- content/components/button-and-link/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/components/button-and-link/_index.md b/content/components/button-and-link/_index.md index 72e45aa..ab9d65f 100644 --- a/content/components/button-and-link/_index.md +++ b/content/components/button-and-link/_index.md @@ -5,7 +5,7 @@ maturity: "alpha" ### 常見按鈕 -{{< live-example partial="ctas/button.html" i18n_selector="button" i18n="en-US:Submit,Delete,Cancel;ja:送信,削除,キャンセル;vi:Gửi,Xóa,Hủy;th:ส่ง,ลบ,ยกเลิก" >}} +{{< live-example partial="ctas/button.html" i18n_selector="button" i18n="en-US:Submit,Delete,Next;ja:送信,削除,キャンセル;vi:Gửi,Xóa,Hủy;th:ส่ง,ลบ,ยกเลิก" >}} #### CSS From f891957096a8846f3bbd383862f49e2eb072c1ad Mon Sep 17 00:00:00 2001 From: Benson Su Date: Thu, 19 Mar 2026 10:55:24 +0800 Subject: [PATCH 4/8] fix form and checkable i18n Ported from tmp/0726 185f776 + 5355e56 (checkable/_index.md and radios-with-extra-elements.html already reflected in Hugo main) --- content/components/form/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/components/form/_index.md b/content/components/form/_index.md index 1708fe9..8602897 100644 --- a/content/components/form/_index.md +++ b/content/components/form/_index.md @@ -23,7 +23,7 @@ maturity: "alpha" ### 選項欄位 -{{< live-example partial="form/form-checkable.html" i18n_selector="[for=id],[for=items]" i18n="en-US:ID type,Lost document replacement" >}} +{{< live-example partial="form/form-checkable.html" i18n_selector="[for=id],[for=items],[for=v-healthid],[for=v-moica],[for=v-phone],[for=check-h-healthid],[for=check-h-moica],[for=check-h-id]" i18n="en-US:ID type,Lost document replacement,NHI Card,Digital Certificate,Cell phone,NHI Card,Digital Certificate,ID Card" >}} #### CSS From 623e32c8bc04e983bc1d2368d8b5a2ba7f1af46e Mon Sep 17 00:00:00 2001 From: Benson Su Date: Thu, 19 Mar 2026 10:56:42 +0800 Subject: [PATCH 5/8] fix: i18n_selector can now map with selector order but also DOM order with given exectly one selector Ported from tmp/0726 1867956 (main.js and form-elements.html already reflected in Hugo main) --- content/components/form/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/components/form/_index.md b/content/components/form/_index.md index 8602897..a02738f 100644 --- a/content/components/form/_index.md +++ b/content/components/form/_index.md @@ -5,7 +5,7 @@ maturity: "alpha" ### 簡易欄位 -{{< live-example partial="form/form-elements.html" i18n_selector="[for=name],[for=city],[for=desc]" i18n="en-US:Full name,City of residence,Description" >}} +{{< live-example partial="form/form-elements.html" i18n_selector="[for=name],[for=city],[for=desc],[for=select],[for=taipei],[for=newtaipei],[for=keelung]" i18n="en-US:Full name,City of residence,Description,Select,Taipei,New Taipei,Keelung" >}} #### CSS From 0a7a3b593484d13d78c1fe6d753da04c28969b9c Mon Sep 17 00:00:00 2001 From: tony140407 Date: Thu, 19 Mar 2026 11:21:26 +0800 Subject: [PATCH 6/8] fix: pass i18n params from live-example shortcode to example partial live-example.html was not forwarding i18n and i18n_selector to the example.html partial, so the language selector never rendered. Also fix $.i18n_selector reference inside with .i18n block where the dot context changes to the i18n string. --- layouts/_partials/example.html | 2 +- layouts/_shortcodes/live-example.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_partials/example.html b/layouts/_partials/example.html index d9458ac..c5be023 100644 --- a/layouts/_partials/example.html +++ b/layouts/_partials/example.html @@ -8,7 +8,7 @@ }} From eeeaeaf1926163f2c6e0b2e91df369189ba65993 Mon Sep 17 00:00:00 2001 From: tony140407 Date: Thu, 19 Mar 2026 14:45:51 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix(form):=20=E4=BF=AE=E6=AD=A3=20live-exam?= =?UTF-8?q?ple=20i18n=20=E5=8F=83=E6=95=B8=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 i18n 值末尾多餘的分號,避免程式解析錯誤。 - 修正 i18n_selector 從 [for=] 改為 [value=] 以正確對應