From cfb72949308c73e0d28981772ff04b16962092a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eetu=20Mansikkam=C3=A4ki?= Date: Wed, 11 Oct 2023 17:31:22 +0200 Subject: [PATCH] AV-2017: Fix heading margins within expander titles --- .../avoindata-ckeditor5-plugins/css/styles.css | 11 +++++++++++ opendata-assets/src/less/drupal/custom-elements.less | 6 ++++++ opendata-assets/src/less/drupal/editor.less | 10 +++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css b/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css index e6c22c9988..7714e29798 100644 --- a/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css +++ b/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css @@ -39,6 +39,11 @@ display: inline-block; width: calc(100% - 45px); } +.avoindata-expander-title h2, +.avoindata-expander-title h3, +.avoindata-expander-title h4 { + margin: 0; +} .avoindata-expander-content { display: none; padding: 0 20px 15px; @@ -257,6 +262,12 @@ a.external svg { color: #2a6ebb; display: block; } +.ck-content .avoindata-expander .avoindata-expander-title h2, +.ck-content .avoindata-expander .avoindata-expander-title h3, +.ck-content .avoindata-expander .avoindata-expander-title h4 { + margin: 0; + margin-top: 1em; +} .ck-content .avoindata-expander .avoindata-expander-content { padding: 0 20px 15px; } diff --git a/opendata-assets/src/less/drupal/custom-elements.less b/opendata-assets/src/less/drupal/custom-elements.less index d5f6e73413..0623e6caf5 100644 --- a/opendata-assets/src/less/drupal/custom-elements.less +++ b/opendata-assets/src/less/drupal/custom-elements.less @@ -47,6 +47,12 @@ padding: 20px 0 20px 20px; display: inline-block; width: calc(100% - 45px); + + h2, + h3, + h4 { + margin: 0; + } } .avoindata-expander-content { diff --git a/opendata-assets/src/less/drupal/editor.less b/opendata-assets/src/less/drupal/editor.less index 09217b60e3..46a1f2ffb4 100644 --- a/opendata-assets/src/less/drupal/editor.less +++ b/opendata-assets/src/less/drupal/editor.less @@ -42,13 +42,21 @@ border: 1px solid #ecedee; margin: 0; - .avoindata-expander-title { + + .avoindata-expander-title { font-size: 18px; font-weight: 600; line-height: 27px; padding: 0 20px 5px; color: #2a6ebb; display: block; + + h2, + h3, + h4 { + margin: 0; + margin-top: 1em; + } } .avoindata-expander-content {