From 731eb79c3625e6fda5feaf1d5d6915ff90567364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Wed, 22 Dec 2021 16:22:57 +0100 Subject: [PATCH] Fix table styles in rte context --- .../TypoScript/Library/ParseFunc.typoscript | 6 ++--- .../Assets/scss/base/_rte-content.scss | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/ParseFunc.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/ParseFunc.typoscript index 90e792d9..7469f5f2 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/ParseFunc.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/Library/ParseFunc.typoscript @@ -58,7 +58,7 @@ lib.parseFunc { lib.parseFunc_RTE < lib.parseFunc lib.parseFunc_RTE { externalBlocks := addToList(article, aside, blockquote, div, dd, dl, footer) - externalBlocks := addToList(header, nav, ol, section, table, ul, pre) + externalBlocks := addToList(header, nav, ol, section, table, ul, pre, svg, use) externalBlocks { ol { stripNL = 1 @@ -75,12 +75,12 @@ lib.parseFunc_RTE { table { stripNL = 1 stdWrap { - wrap =
|
+ wrap =
|
} callRecursive = 1 callRecursive.tagStdWrap.HTMLparser = 1 callRecursive.tagStdWrap.HTMLparser.tags.table { - fixAttrib.class.default = table table-condensed table-striped + fixAttrib.class.default = w-full } HTMLtableCells = 1 HTMLtableCells { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss index 0ff04697..2976ce4c 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/base/_rte-content.scss @@ -13,3 +13,28 @@ p { a:not(.button) { @apply text-ep-primary-light sbw:text-sbw-primary-dark; } + +table, +.table { + @apply w-full; +} + +thead { + tr { + @apply bg-ep-primary-dark text-white + } +} + +tbody { + tr { + @apply odd:bg-gray-100; + } +} + +th { + @apply p-2 text-left; +} + +td { + @apply p-2; +}