Skip to content

Commit 6709a30

Browse files
authored
fix(design): Typography Text and Paragraph className should work about line-height, color and font-size (#1180)
1 parent 5cef32b commit 6709a30

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

packages/design/src/typography/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ nav:
1818
<code src="./demo/editable.tsx" title="可编辑"></code>
1919
<code src="./demo/editable-modal.tsx" title="在 Modal 中编辑"></code>
2020
<code src="./demo/font-family.tsx" title="字体" description="详见 [字体设计规范](/docs/spec/typography)。"></code>
21-
<code src="./demo/inner.tsx" title="和其他组件组合使用" debug></code>
21+
<code src="./demo/inner.tsx" title="和其他组件组合使用" description="需要继承父组件的字体样式和行高" debug></code>
2222

2323
## API
2424

packages/design/src/typography/style/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,10 @@ export const genTypographyStyle: GenerateStyle<TypographyToken> = (
1212

1313
return {
1414
// inherit color and lineHeight from parent instead of fixed colorText
15-
[`span${componentCls}`]: {
16-
lineHeight: 'inherit',
17-
color: 'inherit',
18-
fontSize: 'inherit',
19-
},
20-
[`div${componentCls}`]: {
15+
[`${componentCls}`]: {
2116
lineHeight: 'inherit',
2217
color: 'inherit',
2318
fontSize: 'inherit',
24-
},
25-
[`${componentCls}`]: {
2619
[`${componentCls}-edit`]: {
2720
fontSize: token.fontSize,
2821
},

0 commit comments

Comments
 (0)