From 2a7f975ebf28edc9972103d0d7a5b6876e68cd08 Mon Sep 17 00:00:00 2001
From: Eric Bremner <ebremner@uwaterloo.ca>
Date: Fri, 16 Sep 2022 14:35:39 -0400
Subject: [PATCH] ISTWCMS-5801: adding things for captions in FF

---
 .../facts-and-figures/_facts-and-figures.scss        |  7 +++++++
 .../facts-and-figures/facts-and-figures.twig         | 12 ++++++++++++
 .../facts-and-figures/facts-and-figures.yml          |  6 ++++++
 3 files changed, 25 insertions(+)

diff --git a/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss b/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss
index 69b0e4bd..8de81b61 100644
--- a/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss
+++ b/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss
@@ -633,6 +633,13 @@ are the same height. */
         font-size: var(--font-size-00);
         line-height: var(--font-lineheight-2);
       }
+
+      em, i {
+        font-style: normal;
+      }
+      strong, b {
+        font-weight: bold;
+      }
     }
   }
 
diff --git a/src/patterns/04-components/facts-and-figures/facts-and-figures.twig b/src/patterns/04-components/facts-and-figures/facts-and-figures.twig
index bfbea4ed..b672b04f 100644
--- a/src/patterns/04-components/facts-and-figures/facts-and-figures.twig
+++ b/src/patterns/04-components/facts-and-figures/facts-and-figures.twig
@@ -16,6 +16,12 @@
                   <div class="uw-ff--text uw-ff--text__{{ detail.type }}">
                     <img src="{{ detail.icon }}" />
                   </div>
+                {% elseif detail.type == 'caption' %}
+                  {% if detail.caption %}
+                    <span class="uw-ff--text uw-ff--text__caption">
+                      {{ detail.caption }}
+                    </span>
+                  {% endif %}
                 {% else %}
                   <span class="uw-ff--text uw-ff--text__{{ detail.type }}">{{ detail.text }}</span>
                 {% endif %}
@@ -38,6 +44,12 @@
             <div class="uw-ff--text uw-ff--text__{{ detail.type }}">
               <img src="{{ detail.icon }}" />
             </div>
+          {% elseif detail.type == 'caption' %}
+            {% if detail.caption %}
+              <span class="uw-ff--text uw-ff--text__caption">
+                {{ detail.caption }}
+              </span>
+            {% endif %}
           {% else %}
             <span class="uw-ff--text uw-ff--text__{{ detail.type }}">{{ detail.text }}</span>
           {% endif %}
diff --git a/src/patterns/04-components/facts-and-figures/facts-and-figures.yml b/src/patterns/04-components/facts-and-figures/facts-and-figures.yml
index f71409b3..7ff6dbd4 100644
--- a/src/patterns/04-components/facts-and-figures/facts-and-figures.yml
+++ b/src/patterns/04-components/facts-and-figures/facts-and-figures.yml
@@ -19,6 +19,9 @@ ffs:
       -
         text: 'Small #1'
         type: 'small'
+      -
+        caption: '<p>This <strong>would be</strong> caption</p>'
+        type: 'caption'
     -
       - type: 'infographics'
         infographics:
@@ -71,3 +74,6 @@ ffs:
       -
         text: 'Small #1'
         type: 'small'
+      -
+        caption: '<p>This would be caption</p>'
+        type: 'caption'
-- 
GitLab