<?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 calcite-list-item description with Carriage Returns in Calcite Design System Questions</title>
    <link>https://community.esri.com/t5/calcite-design-system-questions/calcite-list-item-description-with-carriage/m-p/1399654#M609</link>
    <description>&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp;&lt;SPAN&gt;calcite-list. I would like its child&amp;nbsp;calcite-list-items to have descriptions that include carriage returns. The&amp;nbsp;&lt;SPAN&gt;calcite-list-items are created in JS code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const item = document.createElement("calcite-list-item");
item.setAttribute("label", "This is the label);
item.setAttribute("value", someValue);
const theDescription = "First Line \n Second Line"
item.setAttribute("description", theDescription);
document.getElementById("my-calcite-list").appendChild(item);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "\n" is not obeyed and the resulting description is "First Line Second Line".&lt;/P&gt;&lt;P&gt;I would like to include carriage returns in the description.&lt;/P&gt;&lt;P&gt;TIA for your help.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Mar 2024 14:28:26 GMT</pubDate>
    <dc:creator>Dirk_Vandervoort</dc:creator>
    <dc:date>2024-03-22T14:28:26Z</dc:date>
    <item>
      <title>calcite-list-item description with Carriage Returns</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/calcite-list-item-description-with-carriage/m-p/1399654#M609</link>
      <description>&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;I have a&amp;nbsp;&lt;SPAN&gt;calcite-list. I would like its child&amp;nbsp;calcite-list-items to have descriptions that include carriage returns. The&amp;nbsp;&lt;SPAN&gt;calcite-list-items are created in JS code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const item = document.createElement("calcite-list-item");
item.setAttribute("label", "This is the label);
item.setAttribute("value", someValue);
const theDescription = "First Line \n Second Line"
item.setAttribute("description", theDescription);
document.getElementById("my-calcite-list").appendChild(item);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "\n" is not obeyed and the resulting description is "First Line Second Line".&lt;/P&gt;&lt;P&gt;I would like to include carriage returns in the description.&lt;/P&gt;&lt;P&gt;TIA for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 14:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/calcite-list-item-description-with-carriage/m-p/1399654#M609</guid>
      <dc:creator>Dirk_Vandervoort</dc:creator>
      <dc:date>2024-03-22T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: calcite-list-item description with Carriage Returns</title>
      <link>https://community.esri.com/t5/calcite-design-system-questions/calcite-list-item-description-with-carriage/m-p/1399665#M610</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/573916"&gt;@Dirk_Vandervoort&lt;/a&gt;&amp;nbsp;You could set the&amp;nbsp;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/CSS/white-space#pre-line" target="_blank" rel="noopener"&gt;CSS white-space property to "pre-line"&lt;/A&gt;, to determine how white space is handled inside the element:&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/geospatialem/pen/RwOVKQy" target="_blank"&gt;https://codepen.io/geospatialem/pen/RwOVKQy&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="css"&gt;#my-calcite-list-item {
  white-space: pre-line;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 14:49:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/calcite-design-system-questions/calcite-list-item-description-with-carriage/m-p/1399665#M610</guid>
      <dc:creator>KittyHurley</dc:creator>
      <dc:date>2024-03-22T14:49:57Z</dc:date>
    </item>
  </channel>
</rss>

