カラー設定
| 名前 | スラッグ | 値 |
|---|---|---|
| ベーステキスト | text-base | #666666 |
| ベーステキスト明 | text-base-light | #888888 |
| ボディ秋 基本:oldlace | body-fall | #fdf5e6 |
| ボディ春:honeydew70% | body-spring | #f0fff0b3 |
| ボディ夏:aliceblue | body-summer | #f0f8ff |
| ボディ冬:papayawhip | body-winter | #ffefd5 |
| 背景アイボリー:ivory | bg-ivory | #fffff0 |
| 背景ベージュ:beige | bg-beige | #f5f5dc |
| ノート罫線 | ruled-lines | #edf3fc |
| 罫線カテゴリ:blanchedalmond | ruled-lines-category | #ffebcd |
| 罫線タグ | ruled-lines-tag | #fee3e1 |
| サンプル背景:mintcream | sample-bg | #f5fffa |
| コードテキスト:lawngreen | text-code | #7cfc00 |
| コード背景:黒板 | bg-code | #224444 |
| コード背景明:lightyellow | bg-code-light | #ffffe0 |
| ヘッダ背景:Hover.css | bg-header | #2098d1 |
| フッタ背景:orange | bg-footer | #ffa500 |
| サーバー環境:orange補色 | orange-complementary | #0073ff |
フォント設定
フォントファミリー
| 名前 | スラッグ | 読み込み |
|---|---|---|
| System Font | system-font | -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif |
| Meiryo | meiryo | 'Meiryo', 'メイリオ', sans-serif |
| 游明朝 | yu-mincho | 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'MS PMincho', serif |
| Noto Sans JP | noto-sans-jp | "Noto Sans JP", sans-serif |
| Noto Sans Mono | noto-sans-mono | "Noto Sans Mono", monospace |
| monospace | monospace | monospace |
フォントサイズ
| 名前 | スラッグ | 値 |
|---|---|---|
| Step 0000 (10px) | step-0000 | 0.625rem |
| Step 000 (11px) | step-000 | 0.6875rem |
| Step 00 (12px) | step-00 | 0.75rem |
| Step 0 (13px) | step-0 | 0.8125rem |
| Step 1 (14px) | step-1 | 0.875rem |
| Step 2 (14px-16px) | step-2 | 0.9375rem |
| Step 3 (16px-18px) | step-3 | 1rem |
| Step 4 (18px-20px) | step-4 | 1.125rem |
| Step 5 (20px-24px) | step-5 | 1.25rem |
| Step 6 (24px-30px) | step-6 | 1.5rem |
| Step 7 (28px-36px) | step-7 | 1.75rem |
| Step 8 (32px-48px) | step-8 | 2rem |
| Step 9 (40px-64px) | step-9 | 2.5rem |
| Step 10 (48px-80px) | step-10 | 3rem |
スペース設定
| 名前 | スラッグ | 値 |
|---|---|---|
| Step 000 (0.5px) | step-000 | 0.03125rem |
| Step 00 (1px) | step-00 | 0.0625rem |
| Step 0 (2px) | step-0 | 0.125rem |
| Step 1 (4px) | step-1 | 0.25rem |
| Step 1.5 (6px) | step-1-5 | 0.375rem |
| Step 2 (7px-10px) | step-2 | clamp(0.4375rem, 0.354rem + 0.417vw, 0.625rem) |
| Step 2.5 (10px-12px) | step-2-5 | clamp(0.625rem, 0.569rem + 0.278vw, 0.75rem) |
| Step 3 (12px-16px) | step-3 | clamp(0.75rem, 0.667rem + 0.417vw, 1rem) |
| Step 4 (16px-20px) | step-4 | clamp(1rem, 0.917rem + 0.417vw, 1.25rem) |
| Step 5 (20px-24px) | step-5 | clamp(1.25rem, 1.167rem + 0.417vw, 1.5rem) |
| Step 6 (28px-36px) | step-6 | clamp(1.75rem, 1.583rem + 0.833vw, 2.25rem) |
| Step 7 (40px-56px) | step-7 | clamp(2.5rem, 2.167rem + 1.667vw, 3.5rem) |
| Step 8 (56px-80px) | step-8 | clamp(3.5rem, 3rem + 2.5vw, 5rem) |
| Step 9 (80px-120px) | step-9 | clamp(5rem, 4.167rem + 4.167vw, 7.5rem) |
| Step 10 (120px-160px) | step-10 | clamp(7.5rem, 6.667rem + 4.167vw, 10rem) |
| Step -0.5px | step–0_5px | -0.5px |
| Step -1px | step–1px | -1px |
| Step -2px | step–2px | -2px |
| Step -3px | step–3px | -3px |
| Step -4px | step–4px | -4px |
| Step -5px | step–5px | -5px |
| Step -6px | step–6px | -6px |
| Step -7px | step–7px | -7px |
| Step -8px | step–8px | -8px |
| Step -9px | step–9px | -9px |
| Step -10px | step–10px | -10px |
| Step -11px | step–11px | -11px |
| Step -12px | step–12px | -12px |
| Step -13px | step–13px | -13px |
| Step -14px | step–14px | -14px |
| Step -15px | step–15px | -15px |
| Step -16px | step–16px | -16px |
| Step -17px | step–17px | -17px |
| Step -18px | step–18px | -18px |
| Step -19px | step–19px | -19px |
| Step -20px | step–20px | -20px |
| Step -21px | step–21px | -21px |
| Step -22px | step–22px | -22px |
| Step -23px | step–23px | -23px |
| Step -24px | step–24px | -24px |
| Step -25px | step–25px | -25px |
| Step -26px | step–26px | -26px |
| Step -27px | step–27px | -27px |
| Step -28px | step–28px | -28px |
| Step -29px | step–29px | -29px |
| Step -30px | step–30px | -30px |
// // テーマスタイル設定一覧ショートコード [theme_style_guide]
function wp_test_display_theme_settings_table() {
if ( ! is_user_logged_in() ) return '';
$settings = wp_get_global_settings();
$html = '<div class="theme-settings-table-wrapper flex-wrap gap-step-1-5">';
// 基本セクションの定義:H2タイトル
$sections = array(
'color' => array( 'label' => 'カラー設定', 'key' => 'palette' ),
'typography' => array( 'label' => 'フォント設定', 'key' => 'typography' ),
'spacing' => array( 'label' => 'スペース設定', 'key' => 'spacingSizes' ),
);
foreach ( $sections as $section_id => $data ) {
$html .= sprintf( '<section><h2 class="post-header-icon pb-step-1">%s</h2>', esc_html( $data['label'] ) );
if ( $section_id === 'color' ) {
$html .= '<table class="wp-block-table table-base table-json-settings">';
$html .= '<thead><tr><th>名前</th><th>スラッグ</th><th>値 / プレビュー</th></tr></thead><tbody>';
$palette = $settings['color']['palette']['theme'] ?? array();
foreach ( $palette as $item ) {
$html .= sprintf(
'<tr><td>%s</td><td class="monospace font-size-step-1">%s</td><td><span style="display:inline-block; width:1em; height:1em; background:%s; border:1px solid #ccc; vertical-align:middle; margin-right:0.3em;"></span>%s</td></tr>',
esc_html( $item['name'] ), esc_html( $item['slug'] ), esc_html( $item['color'] ), esc_html( $item['color'] )
);
}
$html .= '</tbody></table>';
} elseif ( $section_id === 'typography' ) {
// --- h3:フォントファミリー ---
$html .= '<h3 class="post-header-icon pb-step-0">フォントファミリー</h3>';
$html .= '<table class="wp-block-table table-base table-json-settings mb-step-2" style="max-width:400px">';
$html .= '<thead><tr><th>名前</th><th>スラッグ</th><th>読み込み / プレビュー</th></tr></thead><tbody>';
$families = $settings['typography']['fontFamilies']['theme'] ?? array();
foreach ( $families as $item ) {
$html .= sprintf(
'<tr><td>%s</td><td class="monospace font-size-step-1">%s</td><td style="font-family:%s">%s</td></tr>',
esc_html( $item['name'] ), esc_html( $item['slug'] ), esc_attr( $item['fontFamily'] ), esc_html( $item['fontFamily'] )
);
}
$html .= '</tbody></table>';
// --- h3:フォントサイズ ---
$html .= '<h3 class="post-header-icon pb-step-0">フォントサイズ</h3>';
$html .= '<table class="wp-block-table table-base table-json-settings">';
$html .= '<thead><tr><th>名前</th><th>スラッグ</th><th>値</th></tr></thead><tbody>';
$sizes = $settings['typography']['fontSizes']['theme'] ?? array();
foreach ( $sizes as $item ) {
$html .= sprintf(
'<tr><td>%s</td><td class="monospace font-size-step-1">%s</td><td>%s</td></tr>',
esc_html( $item['name'] ), esc_html( $item['slug'] ), esc_html( $item['size'] )
);
}
$html .= '</tbody></table>';
} elseif ( $section_id === 'spacing' ) {
$html .= '<table class="wp-block-table table-base table-json-settings">';
$html .= '<thead><tr><th>名前</th><th>スラッグ</th><th>値</th></tr></thead><tbody>';
$spacings = $settings['spacing']['spacingSizes']['theme'] ?? array();
foreach ( $spacings as $item ) {
$html .= sprintf(
'<tr><td>%s</td><td class="monospace font-size-step-1">%s</td><td>%s</td></tr>',
esc_html( $item['name'] ), esc_html( $item['slug'] ), esc_html( $item['size'] )
);
}
$html .= '</tbody></table>';
}
$html .= '</section>';
}
$html .= '</div>';
return $html;
}
add_shortcode( 'theme_style_guide', 'wp_test_display_theme_settings_table' );