Skip to content

Commit

Permalink
update heading styles
Browse files Browse the repository at this point in the history
  • Loading branch information
yuheiy committed Jan 8, 2024
1 parent 3b4aada commit dd834cb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/PageHeader.astro
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Title = isHome ? 'p' : 'h1';
</Nav>

<Title
class="text-2xl font-bold leading-tight kerning-all [text-wrap:pretty] [word-break:auto-phrase]"
class="text-2xl font-bold leading-tight kerning-all [hanging-punctuation:none] [text-wrap:pretty] [word-break:auto-phrase]"
set:html={title}
/>

Expand Down
18 changes: 15 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,35 @@ const blogEntries = (await getCollection('blog')).toSorted(

<main>
<section class="wrapper">
<h2 class="mb-12 text-lg font-bold leading-tight text-dynamic-muted">主な投稿</h2>
<h2
class="mb-12 text-lg font-bold leading-tight text-dynamic-muted [hanging-punctuation:none]"
>
主な投稿
</h2>

<DetailsList items={primaryItems} />
</section>

<div class="my-16 border-t"></div>

<section class="wrapper">
<h2 class="mb-12 text-lg font-bold leading-tight text-dynamic-muted">プロジェクト</h2>
<h2
class="mb-12 text-lg font-bold leading-tight text-dynamic-muted [hanging-punctuation:none]"
>
プロジェクト
</h2>

<DetailsList items={projectItems} />
</section>

<div class="my-16 border-t"></div>

<section class="wrapper">
<h2 class="mb-12 text-lg font-bold leading-tight text-dynamic-muted">最近のブログ</h2>
<h2
class="mb-12 text-lg font-bold leading-tight text-dynamic-muted [hanging-punctuation:none]"
>
最近のブログ
</h2>

<DetailsList
items={blogEntries.slice(0, 3).map((entry) => ({
Expand Down
3 changes: 3 additions & 0 deletions src/styles/components/prose.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@
}

h2 {
hanging-punctuation: none;
font-weight: bold;
font-size: theme(fontSize.2xl);
line-height: theme(lineHeight.tight);
font-kerning: normal;
font-feature-settings: 'palt';
word-break: auto-phrase;
text-wrap: pretty;
}

h3 {
hanging-punctuation: none;
font-weight: bold;
font-size: theme(fontSize.lg);
line-height: theme(lineHeight.tight);
Expand Down

0 comments on commit dd834cb

Please sign in to comment.