From 0b9f37d3aab341fa8c51f50a50b184e4c98602a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Kalij=C3=A4rvi?= Date: Thu, 19 Oct 2023 18:03:45 +0300 Subject: [PATCH] UHF-8509: Import table styles into ckeditor. --- src/scss/ckeditor.scss | 81 ++---------------------------------------- 1 file changed, 3 insertions(+), 78 deletions(-) diff --git a/src/scss/ckeditor.scss b/src/scss/ckeditor.scss index 592f737bc..e45c15582 100644 --- a/src/scss/ckeditor.scss +++ b/src/scss/ckeditor.scss @@ -68,84 +68,9 @@ } // 04_elements/_table.scss -// The CKEditor table element dom is quite different from what the end result will be once the node is saved -// so the styles needed quite a bit adjusting. When the table styles are updated remember to update these as well. -// Specificity required because of overlapping styles from CKEditor and hdbt_admin theme. -.ck-editor .ck-content figure.table { - margin: $spacing-double 0; - outline: 1px solid $color-black-60; -} - -.ck-editor .ck-content figure.table table { - border: 0; - display: block; - margin: 0; - max-width: fit-content; - overflow-x: auto; - table-layout: fixed; - white-space: nowrap; -} - -.ck-editor .ck-content figure.table > figcaption { - @include font('body'); - background-color: $color-black; - border: 0; - color: $color-white; - padding: $spacing-double $spacing; - text-align: start; -} - -.ck-editor .ck-content figure.table table thead th { - @include font('small'); - background-color: $color-black; - color: $color-white; - font-weight: $font-weight-medium; - min-width: 140px; - padding: $spacing; - text-align: start; - vertical-align: middle; - white-space: normal; - - p { - font-size: inherit; - font-weight: inherit; - margin: 0; - } -} - -.ck-editor .ck-content figure.table table tbody tr, -.ck-editor .ck-content figure.table table tfoot tr { - border: 0; - - &:hover, - &:active { - background-color: $color-black-5; - } - - th, - td { - @include font('small'); - color: $hdbt-color-black; - min-width: 140px; - text-align: start; - vertical-align: middle; - white-space: normal; - } - - th { - background-color: $color-black; - color: $color-white; - font-weight: $font-weight-medium; - } - - th p, - td p { - margin: 0; - - & + p { - margin: $spacing 0 0; - } - } +// TODO The table is a mess because of source order in table. +.ck-editor .ck-content { + @import '04_elements/_table'; } // hdbt_admin overrides for table styles.