From 4269cfd8cc06190d230fea7c72cb7cb5e9e7f548 Mon Sep 17 00:00:00 2001 From: Yuhei Yasuda Date: Thu, 5 Dec 2024 01:26:26 +0900 Subject: [PATCH] fix for hanging-punctuation --- src/components/DetailsList.astro | 5 ++++- src/components/PageHeader.astro | 2 +- src/layouts/Layout.astro | 2 +- src/pages/index.astro | 4 +++- src/styles/components/prose.css | 1 + 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/DetailsList.astro b/src/components/DetailsList.astro index 0781feb..1c7d138 100644 --- a/src/components/DetailsList.astro +++ b/src/components/DetailsList.astro @@ -29,7 +29,10 @@ const Heading = `h${headingLevel}`; {item.description && (

)} diff --git a/src/components/PageHeader.astro b/src/components/PageHeader.astro index eb63b36..02dfca4 100644 --- a/src/components/PageHeader.astro +++ b/src/components/PageHeader.astro @@ -32,7 +32,7 @@ const Title = isHome ? 'p' : 'h1'; diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 53ae33c..5c3776a 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -55,7 +55,7 @@ const canonicalURL = (() => { https://schepp.dev/posts/smooth-scrolling-and-page-search/ --> <html - class="bg-dynamic leading-normal text-dynamic underline-offset-[0.3ic] @container/root kerning-none [hanging-punctuation:allow-end] [line-break:normal] [overflow-wrap:anywhere] [text-spacing-trim:trim-start] motion-safe:focus-within:scroll-smooth" + class="bg-dynamic leading-normal text-dynamic underline-offset-[0.3ic] @container/root kerning-none [line-break:normal] [overflow-wrap:anywhere] [text-spacing-trim:trim-start] motion-safe:focus-within:scroll-smooth" lang={siteLang} > <head> diff --git a/src/pages/index.astro b/src/pages/index.astro index 88f05fb..5bb9008 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -107,7 +107,9 @@ const latestBlogItems = await Promise.all( <Layout isHome description={siteDescription}> <PageHeader isHome title="安田 祐平"> - <div class="space-y-4 text-dynamic-muted [&_a:any-link]:text-dynamic"> + <div + class="space-y-4 text-dynamic-muted [hanging-punctuation:allow-end] [&_a:any-link]:text-dynamic" + > <p>{siteDescription}</p> <p> 監訳を担当した書籍『<a href={everylayoutUrl} diff --git a/src/styles/components/prose.css b/src/styles/components/prose.css index 556163c..1586219 100644 --- a/src/styles/components/prose.css +++ b/src/styles/components/prose.css @@ -1,5 +1,6 @@ .prose { margin-trim: block; + hanging-punctuation: allow-end; > * { margin-block: 0 !important;