• 見出しなどのブロックに独自のスタイルを追加しています。

    WordPress 6.1ブランチまでは、ブロックのスタイルを選択するボタンにマウスオーバーをすると追加したスタイルがプレビューされていたのですが、WordPress 6.4ブランチ へアップデートすると、プレビューにスタイルが反映されなくなりました。

    投稿画面のソースコードを見ると、プレビューを表示するポップオーバーの仕様が変更されたのはわかったのですが、どうすればこれまで通りプレビュー表示ができるのかがわかりません。解決方法をご教示いただけると幸いです。どうぞ、よろしくお願いします。

    ▼ 6.1ブランチの投稿画面

    ▼ 6.4ブランチにアップデート後の投稿画面

    //ブロックエディタに読み込ませているCSS(該当部分)
    
    .editor-styles-wrapper h2,
    .editor-styles-wrapper h3,
    .editor-styles-wrapper h4,
    .editor-styles-wrapper h5,
    .editor-styles-wrapper h6 {
      margin-top: 0 !important;
      color: #303e3d;
      font-family: "Noto Sans JP", sans-serif;
      font-weight: 500;
      font-kerning: normal;
      font-feature-settings: "palt" 1;
      letter-spacing: 0.04em;
      line-height: 1.5;
    }
    
    /** is-style-under-line - アンダーライン - */
    .editor-styles-wrapper h2.is-style-under-line,
    .editor-styles-wrapper h3.is-style-under-line,
    .editor-styles-wrapper h4.is-style-under-line,
    .editor-styles-wrapper h5.is-style-under-line,
    .editor-styles-wrapper h6.is-style-under-line {
      padding-bottom: 0.6em;
      border-bottom: 2px solid #0daa8b;
    }
    • このトピックはOracleが1年、 2ヶ月前に変更しました。
  • トピック「ブロックのプレビュー表示にスタイルが反映しない」には新たに返信することはできません。