<?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 Applying theme to popups in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/applying-theme-to-popups/m-p/1149000#M76518</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to apply day and night theme to my popups on click of btn. For example if day theme btn is clicked popup should appear in day theme and for night theme same popup should appear with night theme.&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;@import url('&lt;A href="https://js.arcgis.com/4.14/esri/themes/light/main.css" target="_blank"&gt;https://js.arcgis.com/4.14/esri/themes/light/main.css&lt;/A&gt;'); ----&amp;gt; for day&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;@import url('&lt;A href="https://js.arcgis.com/4.14/esri/themes/dark/main.css" target="_blank"&gt;https://js.arcgis.com/4.14/esri/themes/dark/main.css&lt;/A&gt;'); -----&amp;gt; for night&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;in my .css file, but it's not importing dynamically(on btn click). I have to comment and uncomment it manually.&lt;BR /&gt;So is there any way to make the theming dynamic i.e on click of btn theme will change for popups?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 01 Mar 2022 07:49:33 GMT</pubDate>
    <dc:creator>AnantSharma</dc:creator>
    <dc:date>2022-03-01T07:49:33Z</dc:date>
    <item>
      <title>Applying theme to popups</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/applying-theme-to-popups/m-p/1149000#M76518</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to apply day and night theme to my popups on click of btn. For example if day theme btn is clicked popup should appear in day theme and for night theme same popup should appear with night theme.&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;@import url('&lt;A href="https://js.arcgis.com/4.14/esri/themes/light/main.css" target="_blank"&gt;https://js.arcgis.com/4.14/esri/themes/light/main.css&lt;/A&gt;'); ----&amp;gt; for day&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;@import url('&lt;A href="https://js.arcgis.com/4.14/esri/themes/dark/main.css" target="_blank"&gt;https://js.arcgis.com/4.14/esri/themes/dark/main.css&lt;/A&gt;'); -----&amp;gt; for night&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;in my .css file, but it's not importing dynamically(on btn click). I have to comment and uncomment it manually.&lt;BR /&gt;So is there any way to make the theming dynamic i.e on click of btn theme will change for popups?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Mar 2022 07:49:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/applying-theme-to-popups/m-p/1149000#M76518</guid>
      <dc:creator>AnantSharma</dc:creator>
      <dc:date>2022-03-01T07:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Applying theme to popups</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/applying-theme-to-popups/m-p/1149083#M76533</link>
      <description>&lt;P&gt;You can switch the themes dynamically at runtime with something like this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;btn.addEventListener("click", () =&amp;gt; {
    if (theme === "light") {
        sheet.href = "https://js.arcgis.com/4.22/esri/themes/dark/main.css";
        theme = "dark";
    } else if (theme === "dark") {
        sheet.href =
            "https://js.arcgis.com/4.22/esri/themes/light/main.css";
        theme = "light";
    }
});&lt;/LI-CODE&gt;&lt;P&gt;Here is a demo&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/oNoQZNW?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/oNoQZNW?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Mar 2022 14:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/applying-theme-to-popups/m-p/1149083#M76533</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-03-01T14:35:22Z</dc:date>
    </item>
  </channel>
</rss>

