From 8abb913d2b8b74007584939f1ac34e5828e4f06e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eetu=20Mansikkam=C3=A4ki?= Date: Thu, 9 Nov 2023 20:43:48 +0100 Subject: [PATCH 1/2] AV-2070: Return bottom margins for p elements within the editor --- drupal/modules/avoindata-ckeditor5-plugins/css/styles.css | 5 ++++- opendata-assets/src/less/drupal/editor.less | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css b/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css index 7714e29798..532f8a561d 100644 --- a/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css +++ b/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css @@ -234,6 +234,9 @@ a.external svg { position: unset; overflow-y: auto; } +.ck-content p { + margin-bottom: 27px; +} .ck-content .external-link { display: inline-flex; flex-direction: row; @@ -378,7 +381,7 @@ a.external svg { font-weight: 600; } .ck-content .avoindata-section .avoindata-section-content > p { - margin: 0; + margin: 0 0 27px; font-size: 18px; line-height: 27px; font-weight: 400; diff --git a/opendata-assets/src/less/drupal/editor.less b/opendata-assets/src/less/drupal/editor.less index 46a1f2ffb4..89780eada8 100644 --- a/opendata-assets/src/less/drupal/editor.less +++ b/opendata-assets/src/less/drupal/editor.less @@ -20,6 +20,10 @@ } .ck-content { + p { + margin-bottom: 27px; + } + .external-link { display: inline-flex; flex-direction: row; @@ -190,7 +194,7 @@ .avoindata-section-content { & > p { - margin: 0; + margin: 0 0 27px; font-size: 18px; line-height: 27px; font-weight: 400; From a7a545b5c8826f1147a5265888b899b52d447c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eetu=20Mansikkam=C3=A4ki?= Date: Thu, 9 Nov 2023 21:33:41 +0100 Subject: [PATCH 2/2] AV-2070: Return bottom margins for p elements within the editor --- .../css/styles.css | 25 ++++++++++++++-- opendata-assets/src/less/drupal/editor.less | 30 +++++++++++++++++-- opendata-assets/src/less/drupal/guide.less | 11 +++++++ 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css b/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css index 7714e29798..dd2d17782d 100644 --- a/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css +++ b/drupal/modules/avoindata-ckeditor5-plugins/css/styles.css @@ -234,6 +234,27 @@ a.external svg { position: unset; overflow-y: auto; } +.ck-content figure.image { + margin-bottom: 0; +} +.ck-content ol, +.ck-content ul { + margin-top: 0; + margin-bottom: 13.5px; + padding-left: unset; +} +.ck-content p { + margin-bottom: 27px; + margin-top: 0; +} +.ck-content p img:not(.avoindata-hint-icon), +.ck-content p img:not(.avoindata-note-icon) { + margin-bottom: -27px; +} +.ck-content p ~ ol, +.ck-content p ~ ul { + margin-top: -27px; +} .ck-content .external-link { display: inline-flex; flex-direction: row; @@ -378,7 +399,7 @@ a.external svg { font-weight: 600; } .ck-content .avoindata-section .avoindata-section-content > p { - margin: 0; + margin: 0 0 27px; font-size: 18px; line-height: 27px; font-weight: 400; @@ -431,4 +452,4 @@ a.external svg { } .avoindata-section-id-form .ck.ck-button.btn.btn-secondary:hover { background: linear-gradient(to top,#fff 0,gray 300%); -} +} \ No newline at end of file diff --git a/opendata-assets/src/less/drupal/editor.less b/opendata-assets/src/less/drupal/editor.less index 46a1f2ffb4..db0feb52ed 100644 --- a/opendata-assets/src/less/drupal/editor.less +++ b/opendata-assets/src/less/drupal/editor.less @@ -20,6 +20,32 @@ } .ck-content { + figure.image { + margin-bottom: 0; + } + + ol, + ul { + margin-top: 0; + margin-bottom: 13.5px; + padding-left: unset; + } + + p { + margin-bottom: 27px; + margin-top: 0; + + img:not(.avoindata-hint-icon), + img:not(.avoindata-note-icon) { + margin-bottom: -27px; + } + + &~ol, + &~ul { + margin-top: -27px; + } + } + .external-link { display: inline-flex; flex-direction: row; @@ -43,7 +69,7 @@ margin: 0; - .avoindata-expander-title { + .avoindata-expander-title { font-size: 18px; font-weight: 600; line-height: 27px; @@ -190,7 +216,7 @@ .avoindata-section-content { & > p { - margin: 0; + margin: 0 0 27px; font-size: 18px; line-height: 27px; font-weight: 400; diff --git a/opendata-assets/src/less/drupal/guide.less b/opendata-assets/src/less/drupal/guide.less index 472b2fdd7f..2579fde969 100644 --- a/opendata-assets/src/less/drupal/guide.less +++ b/opendata-assets/src/less/drupal/guide.less @@ -70,7 +70,18 @@ } .guide-content p { + margin-top: 0; margin-bottom: 27px; + + img:not(.avoindata-hint-icon), + img:not(.avoindata-note-icon) { + margin-bottom: -27px; + } + + &~ol, + &~ul { + margin-top: -27px; + } } .guide-cycle-btn-container {