Twenty Twenty-Two 3 タイトルタグを小さくする

タイトルが大きすぎて見づらいので、調整しました。指定がclampなので、大きい画面でみるとギョッとするほど大きくてドン引きします。

twenty twenty two heading font sizes

外観 → カスタマイズ → CSS追記

.wp-block-post-title {
	font-size: var(--wp--custom--typography--font-size--gigantic);
}

h2 {
	font-size: var(--wp--custom--typography--font-size--huge);
}

h3 {
	font-size: var(--wp--preset--font-size--x-large);
}

h4 {
	font-size: clamp(1.5rem, 2.75vw, 2rem);
}

h5 {
	font-size: var(--wp--preset--font-size--medium);
}

h6 {
	font-size: var(--wp--preset--font-size--small);
}
タイトルタグ初期設定変更後
.wp-block-post-title
(投稿のh1)
colossalgigantic
h2gigantichuge
h3hugex-large
h4x-largeclamp(1.5rem, 2.75vw, 2rem)
h5mediummedium
h6mediumsmall

※h4は変数不使用の例。clamp(最小値, 推奨値, 最大値)

参照変数

タイプ変数名指定値CSS値
Customcolossalclamp(3.25rem, 8vw, 6.25rem)var(–wp–custom–typography–font-size–colossal)
Customgiganticclamp(2.75rem, 6vw, 3.25rem)var(–wp–custom–typography–font-size–gigantic)
Customhugeclamp(2.25rem, 4vw, 2.75rem)var(–wp–custom–typography–font-size–huge)
Presetx-largeclamp(1.75rem, 3vw, 2.25rem)var(–wp–preset–font-size–x-large)
Presetlarge1.75remvar(–wp–preset–font-size–large)
Presetmedium1.125remvar(–wp–preset–font-size–medium)
Presetsmall1remvar(–wp–preset–font-size–small)

「font-size:」の後を好みのCSS値に置き換えるか、自分の好きな値を手入力するか、その辺は好みで。

作成者: のろのろ

サイト管理者

コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です