From e89238f8220f5c8f095c7a2aa7b780a63f6e49a4 Mon Sep 17 00:00:00 2001
From: Martin Leblanc <m26lebla@uwaterloo.ca>
Date: Wed, 13 Sep 2023 13:53:42 -0400
Subject: [PATCH] ISTWCMS-6569: Adds customized js text-balancer if needed

---
 templates/page/html.html.twig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/templates/page/html.html.twig b/templates/page/html.html.twig
index 63ad3d74..508b4b63 100644
--- a/templates/page/html.html.twig
+++ b/templates/page/html.html.twig
@@ -35,8 +35,11 @@
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
     <link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700&family=Barlow:wght@400;500;700&display=swap" />
     <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700&family=Barlow:wght@400;500;700&display=swap" media="print" onload="this.media='all'" />
+    <!-- Style for the headline balance text js -->
+    <style>.balance-text {visibility: hidden;}@media (scripting: none) {.balance-text {visibility: visible;}}@supports (text-wrap: balance) {.balance-text {text-wrap: balance; visibility: visible;}}</style>
     <noscript>
       <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700&family=Barlow:wght@400;500;700&display=swap" />
+      <style>.balance-text {visibility: visible !important;}</style>
     </noscript>
     {% if not uw_admin_page %}
       <!-- Google Tag Manager -->
@@ -47,7 +50,7 @@
     })(window,document,'script','dataLayer','GTM-M9XLVF');</script>
       <!-- End Google Tag Manager -->
     {% endif %}
-    <css-placeholder token="{{ placeholder_token|raw }}">
+      <css-placeholder token="{{ placeholder_token|raw }}">
       <js-placeholder token="{{ placeholder_token|raw }}">
         </head>
 <body{{ attributes.addClass(body_classes) }}>
-- 
GitLab