add workaround for intercom iframe background being non-transparent in dark mode (#66329)

This commit is contained in:
Dan Cech 2023-04-13 01:46:13 +10:00 committed by GitHub
parent 4025927f7d
commit d49b79fb24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import { useTheme2 } from '..';
import { getAgularPanelStyles } from './angularPanelStyles';
import { getCardStyles } from './card';
import { getElementStyles } from './elements';
import { getExtraStyles } from './extra';
import { getFormElementStyles } from './forms';
import { getMarkdownStyles } from './markdownStyles';
import { getPageStyles } from './page';
@ -18,6 +19,7 @@ export function GlobalStyles() {
<Global
styles={[
getElementStyles(theme),
getExtraStyles(theme),
getFormElementStyles(theme),
getPageStyles(theme),
getCardStyles(theme),

View File

@ -0,0 +1,12 @@
import { css } from '@emotion/react';
import { GrafanaTheme2 } from '@grafana/data';
export function getExtraStyles(theme: GrafanaTheme2) {
return css`
// fix white background on intercom in dark mode
iframe.intercom-borderless-frame {
color-scheme: ${theme.colors.mode};
}
`;
}