<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									標準カラー選択時のstyle属性出力について - Cocoonテーマに関する質問				            </title>
            <link>https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/</link>
            <description>Cocoon ディスカッション掲示板</description>
            <language>ja</language>
            <lastBuildDate>Fri, 17 Jul 2026 23:59:34 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: 標準カラー選択時のstyle属性出力について</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88842</link>
                        <pubDate>Wed, 27 May 2026 12:36:37 +0000</pubDate>
                        <description><![CDATA[@yhira さん
拝承。
実際のブロックを並べた確認すると以下のようになり。
標準パレットもstyle属性あり。

アコーディオン（トグル）
タイムライン
FAQ
見出しボックス
タブ見出しボックス
ラベルボックス

包括可能なボックスで、以下はstyle属性が付かない。

白抜きボックス
タブボックス


●経緯スキンで、タイムラインで独...]]></description>
                        <content:encoded><![CDATA[<p>@yhira さん</p>
<p>拝承。</p>
<p>実際のブロックを並べた確認すると以下のようになり。</p>
<p>標準パレットもstyle属性あり。</p>
<ul>
<li>アコーディオン（トグル）</li>
<li>タイムライン</li>
<li>FAQ</li>
<li>見出しボックス</li>
<li>タブ見出しボックス</li>
<li>ラベルボックス<br /><br /></li>
</ul>
<p>包括可能なボックスで、以下はstyle属性が付かない。</p>
<ul>
<li>白抜きボックス</li>
<li>タブボックス</li>
</ul>
<hr />
<p><span style="font-size: 14pt"><strong>●経緯</strong></span><br />スキンで、タイムラインで独自スタイルを設定可能としており。<br />独自にget_block_editor_color_palette_cssと同じことをし、該当のクラスに色を反映している。</p>
<p>このとき、タイムラインを見た際、style属性が付与されており、不要と判断した。<br />しかしタイムラインを用いた過去の投稿を見た際、パレットカラーが反映されておらず、その違いに気付いた。</p>
<p>本件をクローズとします。</p>
<p>&nbsp;</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88842</guid>
                    </item>
				                    <item>
                        <title>RE: 標準カラー選択時のstyle属性出力について</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88841</link>
                        <pubDate>Wed, 27 May 2026 12:00:23 +0000</pubDate>
                        <description><![CDATA[ご認識の通り、not-nested-styleクラスは過去の（style属性を持たない）ブロックとの後方互換性を保つために残されています。現在も出力が必要な理由は、新規ブロックにこのクラスがないと、テーマCSS側の古いブロック用ルール（:not(.not-nested-style)）が誤ってマッチし、デザインが競合するためだったかと思います。また、標準パレットでstyle属性が...]]></description>
                        <content:encoded><![CDATA[<p>ご認識の通り、not-nested-styleクラスは過去の（style属性を持たない）ブロックとの後方互換性を保つために残されています。<br />現在も出力が必要な理由は、新規ブロックにこのクラスがないと、テーマCSS側の古いブロック用ルール（:not(.not-nested-style)）が誤ってマッチし、デザインが競合するためだったかと思います。<br /><br />また、標準パレットでstyle属性が付かないブロックがある件ですが、これはテーマCSS側に:not(.not-nested-style)を使った旧仕様の分岐が存在するかどうかの違いです。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>わいひら</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88841</guid>
                    </item>
				                    <item>
                        <title>RE: 標準カラー選択時のstyle属性出力について</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88840</link>
                        <pubDate>Wed, 27 May 2026 05:08:55 +0000</pubDate>
                        <description><![CDATA[●追記
標準パレットでもstyle属性が付かない、ブロックがあります。違いは何？？以前議論した覚えがあり。]]></description>
                        <content:encoded><![CDATA[<p><span style="font-size: 14pt"><strong>●追記</strong></span></p>
<p>標準パレットでもstyle属性が付かない、ブロックがあります。<br />違いは何？？以前議論した覚えがあり。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88840</guid>
                    </item>
				                    <item>
                        <title>標準カラー選択時のstyle属性出力について</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88839</link>
                        <pubDate>Wed, 27 May 2026 04:38:50 +0000</pubDate>
                        <description><![CDATA[----------------------------------------------テーマ名：Cocoonバージョン：2.9.2.15カテゴリー数：16タグ数：13投稿数：722固定ページ数：16ユーザー数：1----------------------------------------------
●設定「タイムライン」ブロックを配置した。このとき、ポイント色をパ...]]></description>
                        <content:encoded><![CDATA[<p>----------------------------------------------<br />テーマ名：Cocoon<br />バージョン：2.9.2.15<br />カテゴリー数：16<br />タグ数：13<br />投稿数：722<br />固定ページ数：16<br />ユーザー数：1<br />----------------------------------------------</p>
<p><span style="font-size: 14pt"><strong>●設定</strong></span><br />「タイムライン」ブロックを配置した。<br />このとき、ポイント色をパレットカラー赤色（標準カラー）とした。<br /><br /></p>
<pre contenteditable="false">&lt;div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-point-color has-red-point-color not-nested-style cocoon-block-timeline" style="--cocoon-custom-point-color:#e60033"&gt;
  &lt;div class="timeline-title"&gt;タイムラインのタイトル&lt;/div&gt;
  &lt;ul class="timeline"&gt;
    &lt;li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"&gt;
      &lt;div class="timeline-item-label"&gt;ラベル&lt;/div&gt;
      &lt;div class="timeline-item-content cf"&gt;
        &lt;div class="timeline-item-title"&gt;パレットかラー赤色&lt;/div&gt;
        &lt;div class="timeline-item-snippet"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</pre>
<p><br />また、一方はカスタムパレットで色を設定した。</p>
<pre contenteditable="false">&lt;div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-point-color not-nested-style cocoon-block-timeline" style="--cocoon-custom-point-color:#357768"&gt;
  &lt;div class="timeline-title"&gt;タイムラインのタイトル&lt;/div&gt;
  &lt;ul class="timeline"&gt;
    &lt;li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"&gt;
      &lt;div class="timeline-item-label"&gt;ラベル&lt;/div&gt;
      &lt;div class="timeline-item-content cf"&gt;
        &lt;div class="timeline-item-title"&gt;カスタムカラー#357768&lt;/div&gt;
        &lt;div class="timeline-item-snippet"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;</pre>
<hr />
<p><span style="font-size: 14pt"><strong>●過去の仕様との比較と確認したいこと</strong></span></p>
<p>過去の投稿を確認して違いがあることに気付き。</p>
<p>過去のバージョンでは、<span style="color: #ff0000">標準パレットの選択時は style 属性（CSS変数）を出力せず</span>、テーマ側のCSSを参照していたかと思います。<br /><br />https://github.com/xserver-inc/cocoon/blob/9de3b38ce1b1f236ff12b449951028c651533a28/lib/gutenberg.php#L539-L541</p>
<p>現在の仕様では、標準・カスタム問わず style 属性が出力されるよう変更されていますが、「従来の（style属性を持たない）既存投稿ブロックとのデザイン互換性を保つために、not-nested-style クラスが残されている」 という<strong>認識であっていますか？</strong></p>
<p>結果、同じブロックで包括された場合、直近にstyle属性が優先されるのでで、現在はnot-nested-styleクラスを参照（出力）する必要はないのではと思いました。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e6%a8%99%e6%ba%96%e3%82%ab%e3%83%a9%e3%83%bc%e9%81%b8%e6%8a%9e%e6%99%82%e3%81%aestyle%e5%b1%9e%e6%80%a7%e5%87%ba%e5%8a%9b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-88839</guid>
                    </item>
							        </channel>
        </rss>
		