<?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 Is it possible to embed an icon in a CSS pseudo-element using an icon field? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982167#M39260</link>
    <description>&lt;P&gt;Is it possible to embed an icon in a CSS pseudo-element using an icon field?&lt;BR /&gt;Is the following code not sufficient to use fontawesome, especially the latest version 6 series, with CSS pseudo-elements such as::before and::after?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My CSS&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;.test-button-wrapper::before {
  display: inline-block;
  content: "\{{ module.style.icon_field.unicode }}";
  font: var(--fa-font-{{ module.style.icon_field.type|lower }});
}&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;Actual output CSS.&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;#hs_cos_wrapper_widget_1716617474254 .test-button-wrapper::before { 
 display: inline-block; 
 content:"\f179"; 
 font: var(--fa-font-regular);
}&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;These appear to be correct outputs, but in fact the fontawesome icon was never displayed with this description.&lt;/P&gt;&lt;P&gt;I would like to know if you can help me with this. Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Sat, 25 May 2024 12:40:44 GMT</pubDate>
    <dc:creator>TMisuna</dc:creator>
    <dc:date>2024-05-25T12:40:44Z</dc:date>
    <item>
      <title>Is it possible to embed an icon in a CSS pseudo-element using an icon field?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982167#M39260</link>
      <description>&lt;P&gt;Is it possible to embed an icon in a CSS pseudo-element using an icon field?&lt;BR /&gt;Is the following code not sufficient to use fontawesome, especially the latest version 6 series, with CSS pseudo-elements such as::before and::after?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My CSS&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;.test-button-wrapper::before {
  display: inline-block;
  content: "\{{ module.style.icon_field.unicode }}";
  font: var(--fa-font-{{ module.style.icon_field.type|lower }});
}&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;Actual output CSS.&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;#hs_cos_wrapper_widget_1716617474254 .test-button-wrapper::before { 
 display: inline-block; 
 content:"\f179"; 
 font: var(--fa-font-regular);
}&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;These appear to be correct outputs, but in fact the fontawesome icon was never displayed with this description.&lt;/P&gt;&lt;P&gt;I would like to know if you can help me with this. Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 12:40:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982167#M39260</guid>
      <dc:creator>TMisuna</dc:creator>
      <dc:date>2024-05-25T12:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to embed an icon in a CSS pseudo-element using an icon field?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982190#M39261</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/749449"&gt;@TMisuna&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Font Awesome icons are provided as a web font. To use them, ensure you've added the Font Awesome library to the &amp;lt;head&amp;gt; section of your HTML file. You can either host the library locally or link to a CDN similar to the below HTML&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" target="_blank"&gt;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css&lt;/A&gt;" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" /&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the below revised CSS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;.test-button-wrapper::before&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; inline-block&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;content: "\&lt;/SPAN&gt;&lt;SPAN&gt;{{&lt;/SPAN&gt; module.style.icon_field.unicode &lt;SPAN&gt;}}&lt;/SPAN&gt;"&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt; ##### font: var(--fa-font-{{ module.style.icon_field.type|lower }});&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;font-family: FontAwesome;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Hope this helps - Happy to help further!!&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Thank you very much and have a great one!&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Warm regards&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 15:29:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982190#M39261</guid>
      <dc:creator>Humashankar</dc:creator>
      <dc:date>2024-05-25T15:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to embed an icon in a CSS pseudo-element using an icon field?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982245#M39262</link>
      <description>&lt;P&gt;The icon was displayed successfully. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 23:50:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Is-it-possible-to-embed-an-icon-in-a-CSS-pseudo-element-using-an/m-p/982245#M39262</guid>
      <dc:creator>TMisuna</dc:creator>
      <dc:date>2024-05-25T23:50:57Z</dc:date>
    </item>
  </channel>
</rss>

