From ed3dbde88ad70c668378ff0e3ae82eb41a2ef989 Mon Sep 17 00:00:00 2001 From: Egor Startsev <78896684+benax-se@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:58:09 +0300 Subject: [PATCH] fix: support themes in list inside Content sub-block (#1054) --- .../__stories__/BackgroundCard.stories.tsx | 4 ++++ src/sub-blocks/Content/Content.scss | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/sub-blocks/BackgroundCard/__stories__/BackgroundCard.stories.tsx b/src/sub-blocks/BackgroundCard/__stories__/BackgroundCard.stories.tsx index 64afd4c78..31eafca5a 100644 --- a/src/sub-blocks/BackgroundCard/__stories__/BackgroundCard.stories.tsx +++ b/src/sub-blocks/BackgroundCard/__stories__/BackgroundCard.stories.tsx @@ -33,6 +33,10 @@ export default { control: {type: 'radio', labels: {undefined: 'default'}}, options: [undefined, 's', 'm', 'l', 'xl'], }, + theme: { + control: {type: 'radio', labels: {undefined: 'default'}}, + options: [undefined, 'dark', 'light'], + }, }, } as Meta; diff --git a/src/sub-blocks/Content/Content.scss b/src/sub-blocks/Content/Content.scss index 519b3c823..5388fc34d 100644 --- a/src/sub-blocks/Content/Content.scss +++ b/src/sub-blocks/Content/Content.scss @@ -130,6 +130,9 @@ $darkSecondary: var(--g-color-text-dark-secondary); #{$block}__title *, #{$block}__text .yfm, #{$block}__text .yfm *, + #{$block}__list *, + #{$block}__list .yfm, + #{$block}__list .yfm *, #{$block}__links a { color: $lightPrimary; } @@ -145,7 +148,8 @@ $darkSecondary: var(--g-color-text-dark-secondary); } } - #{$block}__text { + #{$block}__text, + #{$block}__list { .yfm a { @include content-link($lightPrimary, $lightSecondary); } @@ -163,6 +167,9 @@ $darkSecondary: var(--g-color-text-dark-secondary); #{$block}__title *, #{$block}__text .yfm, #{$block}__text .yfm *, + #{$block}__list *, + #{$block}__list .yfm, + #{$block}__list .yfm *, #{$block}__links a { color: $darkPrimary; } @@ -178,7 +185,8 @@ $darkSecondary: var(--g-color-text-dark-secondary); } } - #{$block}__text { + #{$block}__text, + #{$block}__list { .yfm a { @include content-link($darkPrimary, $darkSecondary); }