mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Navigation: truncate landing page descriptions to 3 lines (#61925)
* truncate landing page descriptions to 3 lines * use correct css prop names
This commit is contained in:
parent
3eb065339f
commit
6b53f927b2
@ -51,7 +51,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
||||
display: 'grid',
|
||||
gap: theme.spacing(3),
|
||||
gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
|
||||
gridAutoRows: '130px',
|
||||
gridAutoRows: '138px',
|
||||
padding: theme.spacing(2, 0),
|
||||
}),
|
||||
});
|
||||
|
@ -15,7 +15,7 @@ export function NavLandingPageCard({ description, text, url }: Props) {
|
||||
return (
|
||||
<Card className={styles.card} href={url}>
|
||||
<Card.Heading>{text}</Card.Heading>
|
||||
<Card.Description>{description}</Card.Description>
|
||||
<Card.Description className={styles.description}>{description}</Card.Description>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@ -25,4 +25,12 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
||||
marginBottom: 0,
|
||||
gridTemplateRows: '1fr 0 2fr',
|
||||
}),
|
||||
// Limit descriptions to 3 lines max before ellipsing
|
||||
// Some plugin descriptions can be very long
|
||||
description: css({
|
||||
WebkitLineClamp: 3,
|
||||
WebkitBoxOrient: 'vertical',
|
||||
display: '-webkit-box',
|
||||
overflow: 'hidden',
|
||||
}),
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user