From b38318ff10c86387253fa917e8cb83aeab45802c Mon Sep 17 00:00:00 2001 From: Andrey Morozov Date: Thu, 19 May 2022 18:18:09 +0300 Subject: [PATCH] fix: replace font-weight usages with mixin (#167) --- src/components/List/__stories__/ListShowcase.scss | 2 +- src/components/Popover/Popover.scss | 2 +- .../components/SelectControl/SelectControl.scss | 2 +- .../Select/components/SelectPopup/SelectPopup.scss | 2 +- src/components/Table/Table.scss | 2 +- src/components/TextInput/TextInput.scss | 2 +- src/components/Toaster/Toast/Toast.scss | 12 ++++++------ src/demo/Typography/Typography.scss | 3 +-- 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/List/__stories__/ListShowcase.scss b/src/components/List/__stories__/ListShowcase.scss index 9412f46683..fe96a56e1f 100644 --- a/src/components/List/__stories__/ListShowcase.scss +++ b/src/components/List/__stories__/ListShowcase.scss @@ -55,7 +55,7 @@ } &__group { - font-weight: 500; + @include text-accent; color: var(--yc-color-text-secondary); } diff --git a/src/components/Popover/Popover.scss b/src/components/Popover/Popover.scss index 5649dd5bf2..1b9d0dc21e 100644 --- a/src/components/Popover/Popover.scss +++ b/src/components/Popover/Popover.scss @@ -110,7 +110,7 @@ $block: '.#{$ns}popover'; } #{$class}__tooltip-content a:not(.yc-button) { - font-weight: bold; + @include text-accent; color: var(--yc-color-text-light-primary); &:hover { diff --git a/src/components/Select/components/SelectControl/SelectControl.scss b/src/components/Select/components/SelectControl/SelectControl.scss index b542d4e1c6..c523157a8e 100644 --- a/src/components/Select/components/SelectControl/SelectControl.scss +++ b/src/components/Select/components/SelectControl/SelectControl.scss @@ -99,8 +99,8 @@ $block: '.#{$ns}select'; } &__label { + @include text-accent; margin-right: 2px; - font-weight: 500; white-space: nowrap; } diff --git a/src/components/Select/components/SelectPopup/SelectPopup.scss b/src/components/Select/components/SelectPopup/SelectPopup.scss index 6cc4425062..fffe0acb22 100644 --- a/src/components/Select/components/SelectPopup/SelectPopup.scss +++ b/src/components/Select/components/SelectPopup/SelectPopup.scss @@ -68,9 +68,9 @@ $xl-hor-padding: '12px'; &__group-label-content { @include overflow-ellipsis(); + @include text-accent; width: 100%; - font-weight: 500; } &__option { diff --git a/src/components/Table/Table.scss b/src/components/Table/Table.scss index 21c853f598..61598be75e 100644 --- a/src/components/Table/Table.scss +++ b/src/components/Table/Table.scss @@ -122,7 +122,7 @@ } &__th-content { - font-weight: 500; + @include text-accent; display: inline-block; &::first-letter { text-transform: uppercase; diff --git a/src/components/TextInput/TextInput.scss b/src/components/TextInput/TextInput.scss index 0fb4943fb7..b1d78d0d87 100644 --- a/src/components/TextInput/TextInput.scss +++ b/src/components/TextInput/TextInput.scss @@ -17,7 +17,7 @@ $block: '.#{$ns}text-input'; margin: 0; padding: 0; width: 100%; - font-weight: 400; + font-weight: normal; font-family: var(--yc-text-body-font-family); color: var(--yc-color-text-primary); background-color: transparent; diff --git a/src/components/Toaster/Toast/Toast.scss b/src/components/Toaster/Toast/Toast.scss index 49023b10ce..682347ad69 100644 --- a/src/components/Toaster/Toast/Toast.scss +++ b/src/components/Toaster/Toast/Toast.scss @@ -1,4 +1,5 @@ @import '../../variables'; +@import '../../../../styles/mixins'; $block: '.#{$ns}toast'; @@ -111,17 +112,16 @@ $block: '.#{$ns}toast'; } } + &__title { + @include text-subheader-2; + padding-right: 28px; + } + &__title, &__action { line-height: 24px; } - &__title { - padding-right: 28px; - font-size: 15px; - font-weight: 500; - } - #{$iconClass} { margin-right: 6px; } diff --git a/src/demo/Typography/Typography.scss b/src/demo/Typography/Typography.scss index 18e01740ae..e20fe35412 100644 --- a/src/demo/Typography/Typography.scss +++ b/src/demo/Typography/Typography.scss @@ -12,9 +12,8 @@ } &__header { - @include text-body-1(); + @include text-subheader-1(); margin-bottom: 20px; - font-weight: bold; text-transform: uppercase; color: var(--yc-color-text-primary); }