Skip to content

Commit

Permalink
fix lineHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitskvmdam committed Nov 8, 2021
1 parent f7a5943 commit cbbd177
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ export const Alert = forwardRef<HTMLDivElement, AlertProps>(
return {
color: getColorForComponent({ theme }),
marginTop: '0.25rem',
lineHeight: 1.2,
...getThemeCSSObject(csx.message, theme)
}
}
Expand Down
1 change: 0 additions & 1 deletion src/button-base/button-base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ const ButtonBaseRoot = createStyledComponent<'button', ButtonBaseCommonProps>(
display: 'inline-flex',
fill: calculatedColor,
justifyContent: 'center',
margin: 0,
outline: 0,
position: 'relative',
textDecoration: 'none',
Expand Down
1 change: 1 addition & 0 deletions src/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ const ButtonRoot = createStyledComponent<
transition: '0.130s',
...getColor(),
...getFontProperties(),
lineHeight: 1,
fontWeight: 700,
textAlign: 'center',
textTransform: isTextUppercase ? 'uppercase' : undefined,
Expand Down
2 changes: 2 additions & 0 deletions src/card-action/card-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const CardActionRoot = createStyledComponent<'div', CardActionProps>(
return {
padding: '1rem 0.5rem',
...body,
lineHeight: 1.3,

...(isExtendStyleFromThemeVars &&
themeVars.cardAction(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
2 changes: 1 addition & 1 deletion src/card-content/card-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const CardContentRoot = createStyledComponent<'div', CardContentProps>(
flex: '1',
padding: '1.2rem',
...body,
lineHeight: 1.5,
lineHeight: 1.3,
...(isExtendStyleFromThemeVars &&
themeVars.cardContent(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
1 change: 1 addition & 0 deletions src/card-header/card-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const CardHeaderRoot = createStyledComponent<'div', CardHeaderProps>(
display: 'flex',
padding: '1rem 1.2rem',
...h4,
lineHeight: 1.5,
...(isExtendStyleFromThemeVars &&
themeVars.cardHeader(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
1 change: 1 addition & 0 deletions src/card/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const CardRoot = createStyledComponent<'div', CardProps>(
flexDirection: 'column',
'&:hover': getHoverProperties(),
...body,
lineHeight: 1.3,
...(isExtendStyleFromThemeVars &&
themeVars.card(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
1 change: 1 addition & 0 deletions src/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const InputRoot = createStyledComponent<typeof InputBase, InputProps>(
transition: '0.13s',
width: '100%',
...getTypographyProperties(),
lineHeight: 1.2,
...getBorderRadius(),
...(isExtendStyleFromThemeVars &&
themeVars.input(themePropsForThemeVarFn, props)),
Expand Down
1 change: 1 addition & 0 deletions src/label/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const LabelRoot = createStyledComponent<'label', LabelProps>(
color: _color,
fill: _color,
...body,
lineHeight: 1.2,
...(isExtendStyleFromThemeVars &&
themeVars.label(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
1 change: 1 addition & 0 deletions src/list-heading/list-heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const ListHeadingRoot = createStyledComponent<'li', ListHeadingProps>(
top: 0,
zIndex: 1,
...(headingType === 'sub' ? caption : title),
lineHeight: 1.2,
...(isExtendStyleFromThemeVars &&
themeVars.listHeading(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
1 change: 1 addition & 0 deletions src/list-item/list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const ListItemRoot = createStyledComponent<typeof Button, ListItemProps>(
padding: getPadding(),
textTransform: 'none',
...body,
lineHeight: 1.2,
...(isExtendStyleFromThemeVars &&
themeVars.listItem(themePropsForThemeVarFn, props)),
...getThemeCSSObject(csx.root, theme)
Expand Down
1 change: 0 additions & 1 deletion src/modal/modal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const Template: Story = (args) => {
This is a modal
</Typography>
<Button
csx
onClick={toggleModal}
color="error"
variant="outlined"
Expand Down
3 changes: 2 additions & 1 deletion src/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const buildStyle = <

const useStyles = createStyle(({ typography }) => ({
root: {
...typography.body
...typography.body,
lineHeight: 1.2
}
}))

Expand Down
1 change: 1 addition & 0 deletions src/stepper/stepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ const DescriptionContainer = createStyledComponent<
alignment === 'vt' && !isLast
? `0.0625rem solid ${_border}`
: '0',
lineHeight: 1.2,
marginLeft: alignment === 'vt' ? '1.5rem' : '0',
paddingLeft: alignment === 'vt' ? '2.5rem' : '0',
textAlign: alignment === 'hr' ? 'center' : undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/styles/typography/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const defaultFontFamily = 'Arial'
export const defaultBoldFontWeight = 700
export const defaultRegularFontWeight = 500
export const defaultLightFontWeight = 100
export const defaultLineHeight = 1
export const defaultLineHeight = 1.5

export const defaultThemeTypography = {
h1: fontMixin(
Expand Down

0 comments on commit cbbd177

Please sign in to comment.