N°3791 - Panel: Use style defined in the DM for classes

Note that for now, semantic colors cannot be used directly in a <main_color> or <complementary_color> tag. Only valid CSS color (hexa, hsla, ...)
This commit is contained in:
Molkobain
2021-09-26 00:59:22 +02:00
parent 39d71c9c43
commit b15c8e30bc
8 changed files with 91 additions and 64 deletions

View File

@@ -2262,14 +2262,14 @@ EOF
if ($sElementType === self::ENUM_STYLE_HOST_ELEMENT_TYPE_CLASS) {
$sMainColorForOrm = $this->GetPropString($oNode, 'main_color', null);
if (is_null($sMainColorForOrm)) {
// TODO 3.0.0: Should check for main color in parent classes definition
// TODO: Check for main color in parent classes definition is currently done in MetaModel::GetClassStyle() at runtime but it should be done here at compile time
$sMainColorForOrm = "null";
}
$sMainColorForCss = $this->GetPropString($oNode, 'main_color', null, false);
$sComplementaryColorForOrm = $this->GetPropString($oNode, 'complementary_color', null);
if (is_null($sComplementaryColorForOrm)) {
// TODO 3.0.0: Should check for complementary color in parent classes definition
// TODO: Check for main color in parent classes definition is currently done in MetaModel::GetClassStyle() at runtime but it should be done here at compile time
$sComplementaryColorForOrm = "null";
}
$sComplementaryColorForCss = $this->GetPropString($oNode, 'complementary_color', null, false);