diff --git a/src/components/ContentList/ContentList.scss b/src/components/ContentList/ContentList.scss index 350340bcc..163bf3aff 100644 --- a/src/components/ContentList/ContentList.scss +++ b/src/components/ContentList/ContentList.scss @@ -7,6 +7,17 @@ $iconSizeS: 20px; $iconSizeXS: 18px; $marginIconSizeS: 2px; $marginIconSizeL: 1px; +$lightPrimary: var(--g-color-text-light-primary); +$darkPrimary: var(--g-color-text-dark-primary); +$darkSecondary: var(--g-color-text-dark-secondary); + +@mixin content-link($baseColor: $primary, $hoverColor: $secondary) { + color: $baseColor; + text-decoration: underline; + &:hover { + color: $hoverColor; + } +} #{$block} { &_size_l { @@ -84,6 +95,34 @@ $marginIconSizeL: 1px; } } + &_theme_light { + #{$block}__item { + *, + .yfm, + .yfm * { + color: $darkPrimary; + } + + .yfm a { + @include content-link($darkPrimary, $darkSecondary); + } + } + } + + &_theme_dark { + #{$block}__item { + *, + .yfm, + .yfm * { + color: $lightPrimary; + } + + .yfm a { + @include content-link($lightPrimary, $lightSecondary); + } + } + } + &__icon { display: block; } diff --git a/src/components/ContentList/ContentList.tsx b/src/components/ContentList/ContentList.tsx index 428981153..258912824 100644 --- a/src/components/ContentList/ContentList.tsx +++ b/src/components/ContentList/ContentList.tsx @@ -24,11 +24,11 @@ function getHeadingLevel(size: ContentSize) { } } -const ContentList = ({list, size = 'l', qa}: ContentListProps & QAProps) => { +const ContentList = ({list, size = 'l', qa, theme}: ContentListProps & QAProps) => { const qaAttributes = getQaAttrubutes(qa, ['image', 'title', 'text']); return ( -