<?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 Shadow DOM in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1674694#M88006</link>
    <description>&lt;P data-unlink="true"&gt;This question is more for the ESRI team.&amp;nbsp; In &lt;A href="https://www.esri.com/arcgis-blog/products/js-api-arcgis/announcements/version-4-34-of-javascript-maps-sdk-released" target="_self"&gt;this blog&lt;/A&gt; it states "&lt;SPAN&gt;To customize the style, you can use the documented design tokens and component css variables to style components".&amp;nbsp; Where does one find the documentation for both the tokens and css variables?&amp;nbsp; Is there any available training, resources, blogs, ect, that can help us learn and navigate the Shadow DOM of these new components?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Dec 2025 16:03:45 GMT</pubDate>
    <dc:creator>MatthewDriscoll</dc:creator>
    <dc:date>2025-12-23T16:03:45Z</dc:date>
    <item>
      <title>Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1674694#M88006</link>
      <description>&lt;P data-unlink="true"&gt;This question is more for the ESRI team.&amp;nbsp; In &lt;A href="https://www.esri.com/arcgis-blog/products/js-api-arcgis/announcements/version-4-34-of-javascript-maps-sdk-released" target="_self"&gt;this blog&lt;/A&gt; it states "&lt;SPAN&gt;To customize the style, you can use the documented design tokens and component css variables to style components".&amp;nbsp; Where does one find the documentation for both the tokens and css variables?&amp;nbsp; Is there any available training, resources, blogs, ect, that can help us learn and navigate the Shadow DOM of these new components?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Dec 2025 16:03:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1674694#M88006</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2025-12-23T16:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1674714#M88007</link>
      <description>&lt;P&gt;Great question&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/327152"&gt;@MatthewDriscoll&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Several components like &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/#styles" target="_self"&gt;arcgis-map&lt;/A&gt;, &lt;A href="https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/#styles" target="_self"&gt;arcgis-scene&lt;/A&gt;&lt;SPAN&gt;, and others—include a Styles&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;section in their documentation that lists the available CSS variables (these are not inherited from the Calcite Design System).&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;The components also use tokens (css variables) defined by Calcite, which you can find here:&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/calcite-design-system/foundations/tokens/reference/" target="_blank"&gt;https://developers.arcgis.com/calcite-design-system/foundations/tokens/reference/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To determine which Calcite tokens or CSS variables are being applied, you may need to inspect the elements using your browser’s developer tools. If you encounter something you can’t modify and have a strong business case for doing so, please let us know—we may be able to expose a variable to support that need. Hopefully we can create more resources showing how this is done in more detail the new future.&amp;nbsp; There are a few examples in the Samples but they aren't easy to find.... we should improve that.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/featurefilter-attributes/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/featurefilter-attributes/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-dimension/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/layers-dimension/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-control-points/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-control-points/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-interactive/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-interactive/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and others&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 23 Dec 2025 16:47:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1674714#M88007</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2025-12-23T16:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688409#M88233</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;I'd like the ability to apply CSS to the Esri attribution. Look, I understand the aim to limit alteration of Esri's Calcite design. And I understand the reticence of allowing users to remove attribution completely (the Powered by Esri included). I am not looking to remove it. In fact, I never have. But I have worked to at least minimize the impact of the attribution's background color and transparency. Most of our applications are built with requests for customization - especially colors. But here you have this semi-transparent #fff background for the attribution that we can no longer affect with external CSS, as it's hidden down in the Shadow DOM now. Again, I don't want the ability to remove it. But yes, I'd absolutely like to change the color or opacity - in the past, I have removed the background altogether, retaining only the text. It's less intrusive and does not conflict with custom color designs.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 16:56:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688409#M88233</guid>
      <dc:creator>LMFGeospatial</dc:creator>
      <dc:date>2026-03-04T16:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688413#M88234</link>
      <description>&lt;P&gt;Things I have observed that might help.&amp;nbsp; Change the Calcite in the css where you can instead of fighting the dom.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;:root,
.calcite-mode-dark {
      /* Typography */
      --calcite-font-family: "Arial", system-ui, sans-serif;
      --calcite-font-size--1: 12px;
      --calcite-font-size--2: 13px;
}&lt;/LI-CODE&gt;&lt;P&gt;A lot of the shadow root is accessible, AI helps me a lot with this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Shadow DOM styling 
if (cc.shadowRoot) {
  try {
    const ccStyle = document.createElement("style");
    ccStyle.textContent = `
      :host {
        border-radius: 8px !important;
        overflow: hidden !important;
      }
      .root {
        border-radius: 8px !important;
        overflow: hidden !important;
      }
      .conversions-view {
        padding: 6px !important;
      }
      .arcgis-coordinate-conversion__conversion-list,
      .arcgis-coordinate-conversion__conversion-row {
        width: 200px !important;
        max-width: 200px !important;
      }
      .arcgis-coordinate-conversion {
        background: #121826;
        border-radius: 10px;
        padding: 0px 0px;
        width: 250px !important;
      }
    `;
    cc.shadowRoot.appendChild(ccStyle);
  } catch(e) {
    console.warn("CC shadow style failed:", e);
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 17:14:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688413#M88234</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-03-04T17:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688436#M88235</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/886030"&gt;@LMFGeospatial&lt;/a&gt;&amp;nbsp;could you please submit an Idea in the Ideas section of this site to add css variables for attribution customization? It seems like a reasonable request to me but we would likely need to get our design teams input and if it's an "Idea" would allow us to track it a bit better.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 17:45:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688436#M88235</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2026-03-04T17:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688686#M88241</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;I have tried to to append child styles already but have had no luck. Even using your code, the "constructed" styling supersedes my inline styling:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="esri_attr_styling.jpg" style="width: 475px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149374iAF007E3FF6E928D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="esri_attr_styling.jpg" alt="esri_attr_styling.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The esri attribution is, if I understand it correctly, styled in the shadow DOM of the arcgis-map component. So that's how I've attempted to address it. But the style still does not change - the constructed style is retained.&lt;/P&gt;&lt;P&gt;I will add my request to the "Ideas" section as you suggested.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 16:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688686#M88241</guid>
      <dc:creator>LMFGeospatial</dc:creator>
      <dc:date>2026-03-05T16:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688688#M88242</link>
      <description>&lt;P&gt;Try this in your javascript.&amp;nbsp; It worked for me.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// ESRI attribution bar 
const shadowRootAttr = mapElement.shadowRoot;
const attrStyle = document.createElement("style");
attrStyle.textContent = `
  .esri-attribution {
    width: auto !important;
    max-width: 50% !important;
    border-radius: 8px 8px 0 0 !important;
    right: 0 !important;
    left: auto !important;
    background: rgba(0, 0, 0, 0.35) !important;
    opacity: 0.7 !important;
  }
`;
shadowRootAttr.appendChild(attrStyle);&lt;/LI-CODE&gt;&lt;P&gt;* I did a bit more digging.&amp;nbsp; If you are using arcgis-map I don't think it can be reached in the shadow DOM through Calcite.&amp;nbsp; I think it is because the Esri attribution is legally required, so be careful not to make it invisible.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 21:32:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688688#M88242</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-03-06T21:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688696#M88243</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;.&amp;nbsp; &amp;nbsp;The current attribution default in 5.0 is padded a bit from the bottom, where in the past it was hugging it.&amp;nbsp; So now, with the lower slots and the attribution, they can overlap each other.&amp;nbsp; It is shrinking the space to design by doing this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="attribution.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149378i2BB183919710DEE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="attribution.png" alt="attribution.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 17:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1688696#M88243</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-03-05T17:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689086#M88261</link>
      <description>&lt;P&gt;I appreciate this. This does indeed demonstrate an ability to reach the attribution styling. It certainly minimizes the impact by significantly cutting down the width and, via opacity, muting the color a bit. I would still prefer not having to change width. And opacity affects not just the background but the font text as well. As I've noted, I don't want to remove it altogether. My preference would be to have the font at 100% opacity and the background 100% transparent.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 20:24:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689086#M88261</guid>
      <dc:creator>LMFGeospatial</dc:creator>
      <dc:date>2026-03-06T20:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689111#M88262</link>
      <description>&lt;P&gt;You don't have to change the width, I was just giving an example.&amp;nbsp; Here is the js to get rid of the background.&lt;/P&gt;&lt;P&gt;Take note that I am using dark mode in my design, so you will probably need to change that if you are not.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;await mapElement.componentOnReady();
const shadowRootAttr = mapElement.shadowRoot;

// Use an adopted stylesheet to beat the constructed stylesheet
const sheet = new CSSStyleSheet();
sheet.replaceSync(`
  .esri-attribution.calcite-mode-dark {
    --calcite-color-transparent-tint: transparent !important;
  }
  .esri-attribution {
    width: auto !important;
    max-width: 50% !important;
    border-radius: 8px 8px 0 0 !important;
    right: 0 !important;
    left: auto !important;
  }
`);

// Adopt it into the shadow root — appended last so it wins
shadowRootAttr.adoptedStyleSheets = [
  ...shadowRootAttr.adoptedStyleSheets,
  sheet
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 21:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689111#M88262</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-03-06T21:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689127#M88263</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/149463iD8BF63C8550561E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;Is there perhaps some custom CSS styling producing the padded attribution.&amp;nbsp; By default there shouldn't be any space between the bottom of the attribution and the bottom of the map or scene component.&amp;nbsp; It should still be at the very bottom of the view, unless I'm misunderstanding the issue I don't know where the padding or margin is coming from in your screenshot&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/327152"&gt;@MatthewDriscoll&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;A href="https://codepen.io/sagewall/pen/VYKjjwp" target="_blank"&gt;https://codepen.io/sagewall/pen/VYKjjwp&lt;/A&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 21:46:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689127#M88263</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2026-03-06T21:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689130#M88265</link>
      <description>&lt;P&gt;That is strange.&amp;nbsp; The reason I know how to change the attribution is because I ran into this.&amp;nbsp; All I did for the screen shot was comment out the attribute code fix.&amp;nbsp; But today it is not doing it.&amp;nbsp; But, yes it is possible I did something I guess.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On that note, the problem with changing the Calcite CSS is that it is too broad.&amp;nbsp; Many different elements could use the same calcite, but when you only want to change it in one place...time to fight the shadow.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Personally, I feel the the advantage of using the sdk vs experience builder is the ability to customize the design.&amp;nbsp; In 5.0 it feels like way too much of that is being taken away.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 22:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689130#M88265</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2026-03-06T22:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689136#M88266</link>
      <description>&lt;P&gt;Hopefully it will get better as we get more feedback and learn which css variables we should expose on the components to allow for better customization without having to fight the shadow but work with it&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 22:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689136#M88266</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2026-03-06T22:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Shadow DOM</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689492#M88271</link>
      <description>&lt;P&gt;&lt;EM&gt;Personally, I feel the the advantage of using the sdk vs experience builder is the ability to customize the design. In 5.0 it feels like way too much of that is being taken away.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes. Exactly this. I have been saying this for some time. I began with a 4.17 custom application (my first exposure to the Esri JS SDK). I failed to keep pace until about 4.29. By that point, CSS was still friendly to work with. After upgrading to 4.29, I made a commitment to always upgrade when a new release came out. But around 4.31 or so, my designs started to "break". I was spending countless hours looking at the console, trying to figure out how we're NOW supposed to style things. That worked for a little... until 4.34. At that point, so much of my CSS "broke" (most especially in the popup component) that I stopped trying to chase things, knowing 5.0 was coming out in February. When it arrived, I had to confront the issue. And it has been very frustrating fighting that Shadow DOM. And yes, I VERY much prefer custom apps vs WebAppBuilder or ExperienceBuilder because I can do what a client requests more easily (not just styling but functionality). Now I have begun to expect that, at some point, we will be forced to use out-of-the-box non-SDK options only. And so all apps will look and perform the same. And that's not ideal.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2026 18:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/shadow-dom/m-p/1689492#M88271</guid>
      <dc:creator>LMFGeospatial</dc:creator>
      <dc:date>2026-03-09T18:20:36Z</dc:date>
    </item>
  </channel>
</rss>

