From a3558ebdbb3848bfaf447ba1fda752649e5543f8 Mon Sep 17 00:00:00 2001
From: Aspectis <tobias@aspectis.net>
Date: Fri, 12 Mar 2021 14:04:37 +0100
Subject: [PATCH] refs #19352 [fid_bbi] fix heading styles if <h1> is missing

For templates with missing <h1>, style the first <h2> as <h1> and subsequent headings as one level higher.
---
 themes/fid_bbi/scss/blocks/main.scss | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/themes/fid_bbi/scss/blocks/main.scss b/themes/fid_bbi/scss/blocks/main.scss
index 3b5d79c2c9b..a8447d6d684 100644
--- a/themes/fid_bbi/scss/blocks/main.scss
+++ b/themes/fid_bbi/scss/blocks/main.scss
@@ -15,4 +15,17 @@
   > div:not([class]) {
     @include paragraph;
   }
+
+  // For templates with missing <h1>
+  > h2:first-child {
+    @include heading(1);
+
+    ~ h3 {
+      @include heading(2);
+    }
+
+    ~ h4 {
+      @include heading(3);
+    }
+  }
 }
-- 
GitLab