diff --git a/css/backoffice/components/_pill.scss b/css/backoffice/components/_pill.scss index 05a94285c..f97af2a44 100644 --- a/css/backoffice/components/_pill.scss +++ b/css/backoffice/components/_pill.scss @@ -78,6 +78,10 @@ $ibo-pill-states-colors: ( /* Rules */ .ibo-pill { + /* --ibo-main-color-xxx is to allow overload from custom dynamic value from the DM. The overload will be done through an additional CSS class of a particular DM class or DM attribute */ + --ibo-main-color--100: map-get(map-get($ibo-pill-states-colors, 'neutral'), 'primary-color'); + --ibo-main-color--900: map-get(map-get($ibo-pill-states-colors, 'neutral'), 'secondary-color'); + @extend %ibo-fully-centered-content; max-width: $ibo-pill--max-width; margin: $ibo-pill--margin; diff --git a/sources/application/UI/Base/Component/Pill/Pill.php b/sources/application/UI/Base/Component/Pill/Pill.php index d957907e7..57c361769 100644 --- a/sources/application/UI/Base/Component/Pill/Pill.php +++ b/sources/application/UI/Base/Component/Pill/Pill.php @@ -24,7 +24,7 @@ class Pill extends UIContentBlock public const BLOCK_CODE = 'ibo-pill'; public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/pill/layout'; - /** @var null|string CSS class that will be used on the block */ + /** @var null|string CSS class that will be used on the block to define its color scheme */ protected $sCSSColorClass; /** @var null|string URL to go to if the pill is clicked */ protected $sUrl;