diff --git a/packages/grafana-ui/src/components/Icon/Icon.tsx b/packages/grafana-ui/src/components/Icon/Icon.tsx index 230a82a2c26..bd4a53accbc 100644 --- a/packages/grafana-ui/src/components/Icon/Icon.tsx +++ b/packages/grafana-ui/src/components/Icon/Icon.tsx @@ -20,14 +20,15 @@ export interface IconProps extends React.HTMLAttributes { const getIconStyles = stylesFactory((theme: GrafanaTheme) => { return { + // line-height: 0; is needed for correct icon alignment in Safari container: css` label: Icon; display: inline-block; + line-height: 0; `, icon: css` vertical-align: middle; display: inline-block; - margin-bottom: ${theme.spacing.xxs}; fill: currentColor; `, orange: css` diff --git a/packages/grafana-ui/src/components/IconButton/IconButton.tsx b/packages/grafana-ui/src/components/IconButton/IconButton.tsx index dfddd2b1c9e..137dfe14369 100644 --- a/packages/grafana-ui/src/components/IconButton/IconButton.tsx +++ b/packages/grafana-ui/src/components/IconButton/IconButton.tsx @@ -154,7 +154,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme2, size: IconSize, variant: } `, icon: css` - margin-bottom: 0; vertical-align: baseline; display: flex; `,