@grafana/ui
Version:
Grafana Components Library
1 lines • 2.34 kB
Source Map (JSON)
{"version":3,"file":"markdownStyles.mjs","sources":["../../../../src/themes/GlobalStyles/markdownStyles.ts"],"sourcesContent":["import { css } from '@emotion/react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\n\nexport function getMarkdownStyles(theme: GrafanaTheme2) {\n return css({\n '.markdown-html': {\n img: {\n maxWidth: '100%',\n },\n\n 'ul, ol': {\n paddingLeft: theme.spacing(3),\n marginBottom: theme.spacing(2),\n },\n\n table: {\n marginBottom: theme.spacing(2),\n 'td, th': {\n padding: theme.spacing(0.5, 1),\n },\n th: {\n fontWeight: theme.typography.fontWeightMedium,\n background: theme.colors.background.secondary,\n },\n },\n\n 'table, th, td': {\n border: `1px solid ${theme.colors.border.medium}`,\n borderCollapse: 'collapse',\n },\n\n a: {\n color: theme.colors.text.link,\n textDecoration: 'none',\n\n '&:hover': {\n color: theme.colors.text.link,\n textDecoration: 'underline',\n },\n },\n\n 'p:last-child': {\n marginBottom: 0,\n },\n\n 'table:last-child, ul:last-child, ol:last-child': {\n marginBottom: 0,\n },\n },\n });\n}\n"],"names":[],"mappings":";;AAIO,SAAS,kBAAkB,KAAsB,EAAA;AACtD,EAAA,OAAO,GAAI,CAAA;AAAA,IACT,gBAAkB,EAAA;AAAA,MAChB,GAAK,EAAA;AAAA,QACH,QAAU,EAAA;AAAA,OACZ;AAAA,MAEA,QAAU,EAAA;AAAA,QACR,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,QAC5B,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC;AAAA,OAC/B;AAAA,MAEA,KAAO,EAAA;AAAA,QACL,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,QAC7B,QAAU,EAAA;AAAA,UACR,OAAS,EAAA,KAAA,CAAM,OAAQ,CAAA,GAAA,EAAK,CAAC;AAAA,SAC/B;AAAA,QACA,EAAI,EAAA;AAA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