From 0693aa23809af5b4f91ba01e8847c22b902c9c10 Mon Sep 17 00:00:00 2001 From: Andrey Medvedev Date: Wed, 11 Sep 2024 15:58:43 +0300 Subject: [PATCH] Add fontWeight and fontFamily to compact mode (#7566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавлена поддержка compact режима для токенов fontWeight и fontFamily --- .../Typography/Subhead/Subhead.module.css | 36 ++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/packages/vkui/src/components/Typography/Subhead/Subhead.module.css b/packages/vkui/src/components/Typography/Subhead/Subhead.module.css index 997fc8cd3f..633a4c896f 100644 --- a/packages/vkui/src/components/Typography/Subhead/Subhead.module.css +++ b/packages/vkui/src/components/Typography/Subhead/Subhead.module.css @@ -6,13 +6,41 @@ } .Subhead--sizeY-compact { - font-size: var(--vkui--font_subhead--font_size--compact); - line-height: var(--vkui--font_subhead--line_height--compact); + font-size: var( + --vkui--font_subhead--font_size--compact, + var(--vkui--font_subhead--font_size--regular) + ); + line-height: var( + --vkui--font_subhead--line_height--compact, + var(--vkui--font_subhead--line_height--regular) + ); + font-weight: var( + --vkui--font_subhead--font_weight--compact, + var(--vkui--font_subhead--font_weight--regular) + ); + font-family: var( + --vkui--font_subhead--font_family--compact, + var(--vkui--font_subhead--font_family--regular) + ); } @media (--sizeY-compact) { .Subhead--sizeY-none { - font-size: var(--vkui--font_subhead--font_size--compact); - line-height: var(--vkui--font_subhead--line_height--compact); + font-size: var( + --vkui--font_subhead--font_size--compact, + var(--vkui--font_subhead--font_size--regular) + ); + line-height: var( + --vkui--font_subhead--line_height--compact, + var(--vkui--font_subhead--line_height--regular) + ); + font-weight: var( + --vkui--font_subhead--font_weight--compact, + var(--vkui--font_subhead--font_weight--regular) + ); + font-family: var( + --vkui--font_subhead--font_family--compact, + var(--vkui--font_subhead--font_family--regular) + ); } }