<?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 CSS Layer Integration Issue with ArcGIS JavaScript API and Panda CSS (SOLVED) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-layer-integration-issue-with-arcgis-javascript/m-p/1660852#M87799</link>
    <description>&lt;P&gt;&lt;STRIKE&gt;Hello Esri&amp;nbsp;Community, I'm experiencing a CSS&amp;nbsp;cascade issue when integrating the ArcGIS JavaScript API with Panda CSS in&amp;nbsp;my application. The problem stems from how&amp;nbsp;the API at 4.34 now handles automatic style injection. (&lt;A href="https://developers.arcgis.com/javascript/latest/working-with-assets/#:~:text=Starting%20with%20the%204.34%20release%2C%20CSS%20is%20loaded%20automatically%20when%20using%20the%20SDK%27s%20components%20with%20npm%2C%20including%20stylesheets%20for%20both%20the%20components%20and%20Calcite." target="_self"&gt;as per the latest documentation)&lt;/A&gt;:&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Current Setup:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;Using ArcGIS JavaScript API with&amp;nbsp;automatic CSS loading (as recommended&amp;nbsp;in the documentation)&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;Implementing&amp;nbsp;Panda CSS with CSS&amp;nbsp;layers for proper cascade control&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;CSS layer order:&amp;nbsp;&lt;SPAN class=""&gt;@layer vendor,&amp;nbsp;reset, base, tokens, recipes, utilities;&lt;/SPAN&gt;&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;The Problem:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt; The ArcGIS API automatically injects its styles at runtime, which bypasses my CSS layer system.&amp;nbsp;This means:&lt;/STRIKE&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;My custom Calcite CSS variables (defined in the&amp;nbsp;&lt;SPAN class=""&gt;base&lt;/SPAN&gt;&amp;nbsp;layer) get overridden&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;The API's dynamically injected styles always have higher specificity&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;CSS layers&amp;nbsp;become ineffective for managing&amp;nbsp;the cascade order&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Questions:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRIKE&gt;&lt;SPAN class=""&gt;Is there a way to disable automatic CSS injection&lt;/SPAN&gt;&amp;nbsp;and manually import ArcGIS&amp;nbsp;styles into specific CSS layers?&lt;/STRIKE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRIKE&gt;&lt;SPAN class=""&gt;Are there configuration options&lt;/SPAN&gt;&amp;nbsp;to control when/how the API&amp;nbsp;injects its styles?&lt;/STRIKE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRIKE&gt;&lt;SPAN class=""&gt;What's the recommended&amp;nbsp;approach&lt;/SPAN&gt;&amp;nbsp;for integrating ArcGIS API with modern CSS frameworks that&amp;nbsp;rely on cascade layers?&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Desired Solution:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt; Ideally, I'd like to import ArcGIS styles into my&amp;nbsp;&lt;SPAN class=""&gt;vendor&lt;/SPAN&gt;&amp;nbsp;layer&amp;nbsp;so they can be properly overridden by my&amp;nbsp;&lt;SPAN class=""&gt;base&lt;/SPAN&gt;&amp;nbsp;layer styles,&amp;nbsp;maintaining predictable cascade order. Any guidance on best practices&amp;nbsp;for this integration would be&amp;nbsp;greatly appreciated!&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently importing the styles seems to work!&lt;/P&gt;&lt;LI-CODE lang="css"&gt;@import "@arcgis/map-components/main.css" layer(vendor);
@import "@esri/calcite-components/calcite/calcite.css" layer(vendor);
@import "@arcgis/core/assets/esri/themes/light/main.css" layer(vendor);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Oct 2025 17:02:08 GMT</pubDate>
    <dc:creator>JonathanDawe_BAS</dc:creator>
    <dc:date>2025-10-26T17:02:08Z</dc:date>
    <item>
      <title>CSS Layer Integration Issue with ArcGIS JavaScript API and Panda CSS (SOLVED)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-layer-integration-issue-with-arcgis-javascript/m-p/1660852#M87799</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;Hello Esri&amp;nbsp;Community, I'm experiencing a CSS&amp;nbsp;cascade issue when integrating the ArcGIS JavaScript API with Panda CSS in&amp;nbsp;my application. The problem stems from how&amp;nbsp;the API at 4.34 now handles automatic style injection. (&lt;A href="https://developers.arcgis.com/javascript/latest/working-with-assets/#:~:text=Starting%20with%20the%204.34%20release%2C%20CSS%20is%20loaded%20automatically%20when%20using%20the%20SDK%27s%20components%20with%20npm%2C%20including%20stylesheets%20for%20both%20the%20components%20and%20Calcite." target="_self"&gt;as per the latest documentation)&lt;/A&gt;:&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Current Setup:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;Using ArcGIS JavaScript API with&amp;nbsp;automatic CSS loading (as recommended&amp;nbsp;in the documentation)&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;Implementing&amp;nbsp;Panda CSS with CSS&amp;nbsp;layers for proper cascade control&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;CSS layer order:&amp;nbsp;&lt;SPAN class=""&gt;@layer vendor,&amp;nbsp;reset, base, tokens, recipes, utilities;&lt;/SPAN&gt;&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;The Problem:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt; The ArcGIS API automatically injects its styles at runtime, which bypasses my CSS layer system.&amp;nbsp;This means:&lt;/STRIKE&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;My custom Calcite CSS variables (defined in the&amp;nbsp;&lt;SPAN class=""&gt;base&lt;/SPAN&gt;&amp;nbsp;layer) get overridden&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;The API's dynamically injected styles always have higher specificity&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRIKE&gt;CSS layers&amp;nbsp;become ineffective for managing&amp;nbsp;the cascade order&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Questions:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/STRIKE&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRIKE&gt;&lt;SPAN class=""&gt;Is there a way to disable automatic CSS injection&lt;/SPAN&gt;&amp;nbsp;and manually import ArcGIS&amp;nbsp;styles into specific CSS layers?&lt;/STRIKE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRIKE&gt;&lt;SPAN class=""&gt;Are there configuration options&lt;/SPAN&gt;&amp;nbsp;to control when/how the API&amp;nbsp;injects its styles?&lt;/STRIKE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRIKE&gt;&lt;SPAN class=""&gt;What's the recommended&amp;nbsp;approach&lt;/SPAN&gt;&amp;nbsp;for integrating ArcGIS API with modern CSS frameworks that&amp;nbsp;rely on cascade layers?&lt;/STRIKE&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRIKE&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Desired Solution:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt; Ideally, I'd like to import ArcGIS styles into my&amp;nbsp;&lt;SPAN class=""&gt;vendor&lt;/SPAN&gt;&amp;nbsp;layer&amp;nbsp;so they can be properly overridden by my&amp;nbsp;&lt;SPAN class=""&gt;base&lt;/SPAN&gt;&amp;nbsp;layer styles,&amp;nbsp;maintaining predictable cascade order. Any guidance on best practices&amp;nbsp;for this integration would be&amp;nbsp;greatly appreciated!&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently importing the styles seems to work!&lt;/P&gt;&lt;LI-CODE lang="css"&gt;@import "@arcgis/map-components/main.css" layer(vendor);
@import "@esri/calcite-components/calcite/calcite.css" layer(vendor);
@import "@arcgis/core/assets/esri/themes/light/main.css" layer(vendor);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Oct 2025 17:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-layer-integration-issue-with-arcgis-javascript/m-p/1660852#M87799</guid>
      <dc:creator>JonathanDawe_BAS</dc:creator>
      <dc:date>2025-10-26T17:02:08Z</dc:date>
    </item>
  </channel>
</rss>

