<?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: Set the hover background color of a widget (home, compass, zoom) post-4.28 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565254#M86202</link>
    <description>&lt;P&gt;You can try adjusting some of the calcite css variables. It takes a little inspection to see what variables are used where. But this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;    .esri-widget--button {
      --calcite-icon-color: white;
      background-color: red;
    }

    .esri-widget--button:hover {
      --calcite-icon-color: blue;
      --calcite-color-foreground-2: green;
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/JoPGYBB?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/JoPGYBB?editors=1000&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2024 18:09:22 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2024-12-05T18:09:22Z</dc:date>
    <item>
      <title>Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564850#M86187</link>
      <description>&lt;P&gt;I want my widget buttons to be green by default, and turn red when a cursor hovers over the widget button.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'd think the following css would do the trick. It did at 4.27:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;      .esri-widget--button:hover{
            background-color: red!important;
        }
      .esri-widget{
            background-color: green!important;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a codepen that illustrates the issue. Check out the flashing widget buttons. The map info bar is style because it's an esri-widget:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/dirkvandervoort/pen/qEWbEBv" target="_self"&gt;https://codepen.io/dirkvandervoort/pen/qEWbEBv&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Change 4.31to 4.27 in the codepen and you will see what I mean.&lt;/P&gt;&lt;P&gt;Can you help me style my buttons?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 20:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564850#M86187</guid>
      <dc:creator>Dirk_Vandervoort</dc:creator>
      <dc:date>2024-12-04T20:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564896#M86189</link>
      <description>&lt;P&gt;I can get hover by setting the calcite var inside the esri-widget class like below:&lt;/P&gt;&lt;P&gt;I am not 100% sure this color will not show up where you will randomly not expect it, depending on how it's used inside and outside the dom:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Start Map Button Styling*/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Overwrite the calcite color system for widgets */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;.esri-widget&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;--calcite-color-foreground-2&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;red&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;You SHOULD be able to set&amp;nbsp;--calcite-color-foreground-3: green; in the same way, but I am seeing "--calcite-color-foreground-3 not defined" in the Developer Tools&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ColleenDixon_0-1733347567413.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120909i243D9811943FE4C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ColleenDixon_0-1733347567413.png" alt="ColleenDixon_0-1733347567413.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ETA: Pretty sure this has to do with the dom changes that I've heard were introduced in 4.28 (we just recently started using 4 so didn't have 4.27).&amp;nbsp; Since this is inside the dom now, CSS won't permeate it, but the vars are pulled in by ESRI&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ColleenDixon_1-1733347771715.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120910i1F0D4DCE3D9E6F48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ColleenDixon_1-1733347771715.png" alt="ColleenDixon_1-1733347771715.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Dec 2024 21:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564896#M86189</guid>
      <dc:creator>ColleenDixon</dc:creator>
      <dc:date>2024-12-04T21:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564917#M86190</link>
      <description>&lt;P&gt;Edit to above, maybe not the shadow-dom issue, but rather additional styling that is more specific than the styling you had.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get the background color on the non-hover by targeting styling with more specifity:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ColleenDixon_2-1733348516623.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120912i9023DC9D8F73851E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ColleenDixon_2-1733348516623.png" alt="ColleenDixon_2-1733348516623.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;.esri-widget--button:is&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;calcite-button&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;:not&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;:hover&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;background-color&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;green&lt;/SPAN&gt; &lt;SPAN&gt;!important&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Dec 2024 21:45:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564917#M86190</guid>
      <dc:creator>ColleenDixon</dc:creator>
      <dc:date>2024-12-04T21:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564966#M86194</link>
      <description>&lt;P&gt;Getting there:&amp;nbsp;&lt;A href="https://codepen.io/dirkvandervoort/pen/qEWbEBv" target="_self"&gt;https://codepen.io/dirkvandervoort/pen/qEWbEBv&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's an odd combination. I wish I could get the button to go back to it's non-hover state.&lt;/P&gt;&lt;P&gt;I'm looking at the 4.28 update documentation to see if I can get a clue.&lt;/P&gt;&lt;P&gt;Thanks Colleen.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 23:23:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1564966#M86194</guid>
      <dc:creator>Dirk_Vandervoort</dc:creator>
      <dc:date>2024-12-04T23:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565254#M86202</link>
      <description>&lt;P&gt;You can try adjusting some of the calcite css variables. It takes a little inspection to see what variables are used where. But this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;    .esri-widget--button {
      --calcite-icon-color: white;
      background-color: red;
    }

    .esri-widget--button:hover {
      --calcite-icon-color: blue;
      --calcite-color-foreground-2: green;
    }&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/JoPGYBB?editors=1000" target="_blank"&gt;https://codepen.io/odoe/pen/JoPGYBB?editors=1000&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 18:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565254#M86202</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2024-12-05T18:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565533#M86205</link>
      <description>&lt;P&gt;Pardon my cynicism Rene, but&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;--calcite-color-foreground-2&lt;/LI-CODE&gt;&lt;P&gt;to change a hover background color?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 12:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565533#M86205</guid>
      <dc:creator>Dirk_Vandervoort</dc:creator>
      <dc:date>2024-12-06T12:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set the hover background color of a widget (home, compass, zoom) post-4.28</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565693#M86207</link>
      <description>&lt;P&gt;There's some work being done on calcite and core side for css variables like this, so at some point will be able to get conventions down as intended.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 16:55:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-the-hover-background-color-of-a-widget-home/m-p/1565693#M86207</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2024-12-06T16:55:44Z</dc:date>
    </item>
  </channel>
</rss>

