Skip to content

Commit

Permalink
πŸ› Typography: Fix line clamp bug for styled v6 (#3193)
Browse files Browse the repository at this point in the history
  • Loading branch information
oddvernes authored Dec 21, 2023
1 parent 5d7e1c1 commit de11397
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/eds-core-react/src/components/Typography/Typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,13 @@ const StyledTypography = styled.p<StyledProps>`
${({ $typography, $link }) => typographyTemplate($typography, $link)}
${({ $color }) => css({ color: findColor($color) })}
${({ $lines }) =>
//https://caniuse.com/#feat=css-line-clamp
$lines > 0 &&
$lines &&
css`
& {
display: -webkit-box;
-webkit-line-clamp: ${$lines};
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
display: -webkit-box;
-webkit-line-clamp: ${$lines};
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
`}
${({ $link }) =>
$link &&
Expand Down

0 comments on commit de11397

Please sign in to comment.