Browse Source

feat: add smallText and paragraph fontWeight token (#1878)

* feat: add smallText and paragraph fontWeight token

* feat: add more token

* feat: add more token
代强 1 year ago
parent
commit
07437bb89e

+ 5 - 0
packages/semi-foundation/typography/typography.scss

@@ -53,6 +53,10 @@ $module: #{$prefix}-typography;
 
     &-small {
         @include font-size-small;
+        font-weight: $font-typography_smallText-regular-fontWeight;
+        &.#{$module}-paragraph{
+            font-weight: $font-typography_smallParagraph-regular-fontWeight;
+        }
     }
 
     code {
@@ -351,6 +355,7 @@ h6.#{$module},
 p.#{$module}-extended,
 .#{$module}-paragraph.#{$module}-extended {
     line-height: $font-typography_paragraph_extended-lineHeight;
+    font-weight: $font-typography_normalParagraph-regular-fontWeight;
 }
 
 @import "./rtl.scss";

+ 4 - 0
packages/semi-foundation/typography/variables.scss

@@ -26,6 +26,10 @@ $font-typography_title-fontWeight: $font-weight-bold; // 标题文本字重
 $font-typography_link-fontWeight: $font-weight-bold; // 链接文本字重
 $font-typography_strong-fontWeight: $font-weight-bold; // 强调文本字重
 $font-typography_paragraph_extended-lineHeight: 24px; // 宽松行距段落文本行高
+$font-typography_normalText-regular-fontWeight: $font-weight-regular; // normal text 字重 - 正常
+$font-typography_smallText-regular-fontWeight: $font-weight-regular; // small text 字重 - 正常
+$font-typography_normalParagraph-regular-fontWeight: $font-weight-regular; // normal paragraph 字重 - 正常
+$font-typography_smallParagraph-regular-fontWeight: $font-weight-regular; // small paragraph 字重 - 正常
 
 $font-typography_title1-fontWeight: $font-typography_title-fontWeight; // 一级标题文本字重
 $font-typography_title2-fontWeight: $font-typography_title-fontWeight; // 二级标题文本字重