<?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: Styling Popup Text in Angular in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1133660#M75915</link>
    <description>&lt;P&gt;Thanks for your reply!&lt;BR /&gt;&lt;BR /&gt;I don't see any console messages that suggest problems.&lt;BR /&gt;&lt;BR /&gt;It took a while, but I now have a&amp;nbsp;&lt;A href="https://github.com/timohaver/arcgis-ng-popup-text" target="_self"&gt;GitHub repo with a simple application that demonstrates the problem&lt;/A&gt;. This is based on your &lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-angular-cli" target="_blank" rel="noopener"&gt;jsapi-angular-cli repo&lt;/A&gt;, with a minimal amount of code change.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jan 2022 22:48:07 GMT</pubDate>
    <dc:creator>IfThenTim</dc:creator>
    <dc:date>2022-01-13T22:48:07Z</dc:date>
    <item>
      <title>Styling Popup Text in Angular</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1130630#M75780</link>
      <description>&lt;P&gt;Drawing from a &lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/changing-font-size-and-font-weight-of-popup-text/td-p/1128739" target="_self"&gt;prior post on styling popup text&lt;/A&gt;, I discovered the solution did not work for me in an Angular project.&lt;BR /&gt;&lt;BR /&gt;With some help, I landed on a work-around of moving some page-level CSS to global. That seems backwards from the way CSS is supposed to work in Angular.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically, I&amp;nbsp; had to move this code to &lt;FONT face="andale mono,times"&gt;global.scss &lt;/FONT&gt;to&amp;nbsp;be able to change the popup text color to black.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="css"&gt; /* import ArcGIS styles required for map marker popups to display */
 @import "https://js.arcgis.com/4.22/esri/themes/light/view.css";

 /* increase contrast of popup text */
 .esri-feature-content p {
     color: black;
     }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a better way of styling popup text in an Angular application?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 23:05:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1130630#M75780</guid>
      <dc:creator>IfThenTim</dc:creator>
      <dc:date>2022-01-04T23:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Styling Popup Text in Angular</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1130636#M75781</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/535242"&gt;@IfThenTim&lt;/a&gt;&amp;nbsp;that does seem odd. If the map code is in a component, in theory the CSS will work at the component level. Were there any console messages? Do you have a GitHub repo that demonstrates the issue?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 23:32:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1130636#M75781</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2022-01-04T23:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Styling Popup Text in Angular</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1133660#M75915</link>
      <description>&lt;P&gt;Thanks for your reply!&lt;BR /&gt;&lt;BR /&gt;I don't see any console messages that suggest problems.&lt;BR /&gt;&lt;BR /&gt;It took a while, but I now have a&amp;nbsp;&lt;A href="https://github.com/timohaver/arcgis-ng-popup-text" target="_self"&gt;GitHub repo with a simple application that demonstrates the problem&lt;/A&gt;. This is based on your &lt;A href="https://github.com/Esri/jsapi-resources/tree/master/esm-samples/jsapi-angular-cli" target="_blank" rel="noopener"&gt;jsapi-angular-cli repo&lt;/A&gt;, with a minimal amount of code change.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 22:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1133660#M75915</guid>
      <dc:creator>IfThenTim</dc:creator>
      <dc:date>2022-01-13T22:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Styling Popup Text in Angular</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1133719#M75918</link>
      <description>&lt;P&gt;Okay, thanks for the repo. What's going on has to do with CSS precedence and specificity, as well as Angular component life-cycle and encapsulation, so it's a little tricky. The important difference between the Angular component and the Popup is that the ArcGIS API's Popup is not a member of your Angular component when the component is initialized. Popup pulls its CSS from the ArcGIS CDN assets which are loaded after the component's CSS, and by default are pulled from here &lt;A href="https://js.arcgis.com/4.22/@arcgis/core/assets/esri/themes/light/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.22/@arcgis/core/assets/esri/themes/light/main.css&lt;/A&gt;.&amp;nbsp; You can see this request in the developer console's Network tab.&lt;/P&gt;&lt;P&gt;There are several ways to address this issue. You identified one of them - use a global CSS to override styles. You can also host the ArcGIS assets locally and create your own custom Sass-based theme. Here are a few links:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/es-modules/#managing-assets-locally" target="_self"&gt;Working with local assets&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/styling/#custom-css-using-sass" target="_self"&gt;Custom CSS with Sass&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://angular.io/guide/lifecycle-hooks" target="_self"&gt;Angular life-cycle hooks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://angular.io/guide/component-styles" target="_self"&gt;Angular component styles&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Did that help?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 01:48:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1133719#M75918</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2022-01-14T01:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Styling Popup Text in Angular</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1134110#M75928</link>
      <description>&lt;P&gt;Thanks for your assistance. For the near-term circumstances, I will know I have already landed on the best option. It's good to know the alternatives too. &amp;lt;g&amp;gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 23:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/styling-popup-text-in-angular/m-p/1134110#M75928</guid>
      <dc:creator>IfThenTim</dc:creator>
      <dc:date>2022-01-14T23:05:20Z</dc:date>
    </item>
  </channel>
</rss>

