<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help Updating Header Color and Properties for Calcite Popover in Calcite Design System Questions</title>
    <link>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656258#M862</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414189"&gt;@JasonBartling1&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/672573"&gt;@TLombardi&lt;/a&gt;&amp;nbsp;Since Popover (and other components) use Action for the close button, you can also set the close button's styling using &lt;A href="https://developers.arcgis.com/calcite-design-system/components/action/#styles" target="_blank" rel="noopener"&gt;Action's styles&lt;/A&gt;, like so:&lt;/P&gt;&lt;LI-CODE lang="css"&gt;#example-popover {
  --calcite-popover-background-color: var(--calcite-color-brand);
  --calcite-popover-corner-radius: 0.5rem;
  --calcite-popover-text-color: var(--calcite-color-text-inverse);
  --calcite-action-text-color: var(--calcite-color-text-inverse);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Here's a CodePen showing the behavior:&amp;nbsp;&lt;A href="https://codepen.io/geospatialem/pen/MYKmJvo" target="_blank" rel="noopener"&gt;https://codepen.io/geospatialem/pen/MYKmJvo&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Oct 2025 15:54:42 GMT</pubDate>
    <dc:creator>KittyHurley</dc:creator>
    <dc:date>2025-10-08T15:54:42Z</dc:date>
    <item>
      <title>Help Updating Header Color and Properties for Calcite Popover</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1655888#M858</link>
      <description>&lt;P&gt;I've been messing with the CSS on a test application for a while but can't quite seem to figure out how to update the color just for the header div portion of the calcite popover.&amp;nbsp; I see that there is a css variable for --calcite-popover-background-color, but that updates the complete popover and not just the header section.&lt;/P&gt;&lt;P&gt;In my searching I also came across the concept of configuring a custom theme, which sounds good, but I could not find any property there either to do exactly what I want.&amp;nbsp; I also tried using custom css for the header class of the popover, but it also appears to do nothing.&amp;nbsp; Does anyone know what CSS can be used to update the parts of a calcite popover like just the header background, border, and close button?&lt;/P&gt;&lt;P&gt;Here is a simple codepen&amp;nbsp;&lt;A href="https://codepen.io/windowslover/pen/KwVWBWW?editors=1100" target="_blank" rel="noopener"&gt;https://codepen.io/windowslover/pen/KwVWBWW?editors=1100&lt;/A&gt; that I have been working on in my testing.&amp;nbsp; Any help is appreciated! Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Oct 2025 16:33:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1655888#M858</guid>
      <dc:creator>JasonBartling1</dc:creator>
      <dc:date>2025-10-07T16:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help Updating Header Color and Properties for Calcite Popover</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656250#M861</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414189"&gt;@JasonBartling1&lt;/a&gt;&amp;nbsp;, I was just working on styling a popover myself. I think if you use something other than a &amp;lt;p&amp;gt; tag, it will work as expected.&lt;/P&gt;&lt;P&gt;&amp;lt;calcite-popover class="custom-example-theme" heading="About this data" label="About this data" reference-element="popover-button" closable&amp;gt;&lt;BR /&gt;&amp;lt;calcite-block description="This data was collected over a 24 hour period during which 27 volunteers surveyed the local area and collected and reported on sightings of non-native Blackberry."/&amp;gt;&lt;BR /&gt;&amp;lt;/calcite-popover&amp;gt;&lt;/P&gt;&lt;P&gt;calcite-popover {&lt;BR /&gt;--calcite-popover-background-color: #63778c;&lt;BR /&gt;--calcite-popover-text-color: white;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Though my frustration is that the --calcite-popover-text-color doesn't adjust the "X" icon color when the component is set as "closable".&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 15:31:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656250#M861</guid>
      <dc:creator>TLombardi</dc:creator>
      <dc:date>2025-10-08T15:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help Updating Header Color and Properties for Calcite Popover</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656258#M862</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/414189"&gt;@JasonBartling1&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/672573"&gt;@TLombardi&lt;/a&gt;&amp;nbsp;Since Popover (and other components) use Action for the close button, you can also set the close button's styling using &lt;A href="https://developers.arcgis.com/calcite-design-system/components/action/#styles" target="_blank" rel="noopener"&gt;Action's styles&lt;/A&gt;, like so:&lt;/P&gt;&lt;LI-CODE lang="css"&gt;#example-popover {
  --calcite-popover-background-color: var(--calcite-color-brand);
  --calcite-popover-corner-radius: 0.5rem;
  --calcite-popover-text-color: var(--calcite-color-text-inverse);
  --calcite-action-text-color: var(--calcite-color-text-inverse);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Here's a CodePen showing the behavior:&amp;nbsp;&lt;A href="https://codepen.io/geospatialem/pen/MYKmJvo" target="_blank" rel="noopener"&gt;https://codepen.io/geospatialem/pen/MYKmJvo&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 15:54:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656258#M862</guid>
      <dc:creator>KittyHurley</dc:creator>
      <dc:date>2025-10-08T15:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help Updating Header Color and Properties for Calcite Popover</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656260#M863</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/672573"&gt;@TLombardi&lt;/a&gt;&amp;nbsp;Do you mean to change the &amp;lt;p&amp;gt; tag under the calcite-popover to something else like a &amp;lt;div&amp;gt;?&amp;nbsp; I just tried that and it didn't seem to help.&amp;nbsp; The only way I was able to find, after a lot of searching, to change all the elements I wanted in the header was to modify the shadow dom with javascript.&amp;nbsp; This probably isn't a recommended approach, but it worked for me.&amp;nbsp; I updated the codepen above and this is the javascript I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function waitForShadowRoot(hostElement, timeout = 5000) {
  return new Promise((resolve, reject) =&amp;gt; {
    const startTime = Date.now();
    const interval = setInterval(() =&amp;gt; {
      if (hostElement.shadowRoot) {
        clearInterval(interval);
        resolve(hostElement.shadowRoot);
      } else if (Date.now() - startTime &amp;gt; timeout) {
        clearInterval(interval);
        reject(new Error("Shadow Root not attached within timeout."));
      }
    }, 100); // Check every 100ms
  });
}

let style = document.createElement( 'style' );
let popoverHeader = document.querySelector('calcite-popover');
style.innerHTML = '.header { background-color: #008264; --calcite-color-border-3: #008264;} .heading { --calcite-color-text-1: white;} .close-button {--calcite-color-text-3: white;}';

waitForShadowRoot(popoverHeader)
  .then(shadowRoot =&amp;gt; {
    console.log("Shadow Root attached:", shadowRoot);
    // Now you can work with the shadowRoot
    popoverHeader.shadowRoot.appendChild( style );
  });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 15:55:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656260#M863</guid>
      <dc:creator>JasonBartling1</dc:creator>
      <dc:date>2025-10-08T15:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help Updating Header Color and Properties for Calcite Popover</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656469#M865</link>
      <description>&lt;P&gt;Thanks! This is helpful!&amp;nbsp; It isn't quite granular enough to change just the header background color of the popover window, but still useful.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Oct 2025 20:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/help-updating-header-color-and-properties-for/m-p/1656469#M865</guid>
      <dc:creator>JasonBartling1</dc:creator>
      <dc:date>2025-10-08T20:46:54Z</dc:date>
    </item>
  </channel>
</rss>

