Skip to content

Commit

Permalink
fix(design): Typographt.Text editable and edit style should be correct
Browse files Browse the repository at this point in the history
  • Loading branch information
dengfuping committed Nov 19, 2024
1 parent fedc38d commit 0d0563f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/design/src/typography/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,28 @@ export const genTypographyStyle: GenerateStyle<TypographyToken> = (
marginTop: -marginOffset,
marginBottom: `calc(1em - ${marginOffset}px)`,
},
'span&:hover': {
display: 'inline-block',
height: token.controlHeight,
marginTop: -marginOffset,
marginBottom: -marginOffset,
},
'h1&:hover, h2&:hover, h3&:hover, h4&:hover, h5&:hover': {
marginTop: `${-marginOffset}px !important`,
marginBottom: `${-marginOffset}px !important`,
},
},
[`${componentCls}${componentCls}-edit-content`]: {
'div&': {
[`${componentCls}-div&`]: {
insetInlineStart: -token.paddingSM,
marginTop: -marginOffset,
marginBottom: `calc(1em - ${marginOffset}px)`,
},
[`${componentCls}-span&`]: {
insetInlineStart: -token.paddingSM,
marginTop: -marginOffset,
marginBottom: -marginOffset,
},
[`${componentCls}-h1&, ${componentCls}-h2&, ${componentCls}-h3&, ${componentCls}-h4&, ${componentCls}-h5&`]:
{
insetInlineStart: -token.paddingSM,
Expand Down

0 comments on commit 0d0563f

Please sign in to comment.