From 40f94b6f401ae1de3b73595459c0cf18661113fd Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Mon, 13 Nov 2023 23:31:54 -0800 Subject: [PATCH 1/3] [EuiText] Remove `img` tags from blanket margin-bottom logic - doesn't really belong unlike the other tags, as imgs are not block elements by default, and is messing up a production Kibana usage --- src/components/text/__snapshots__/text.styles.test.ts.snap | 4 ---- src/components/text/text.styles.ts | 1 - 2 files changed, 5 deletions(-) diff --git a/src/components/text/__snapshots__/text.styles.test.ts.snap b/src/components/text/__snapshots__/text.styles.test.ts.snap index 5fa6844096e..f4937379d57 100644 --- a/src/components/text/__snapshots__/text.styles.test.ts.snap +++ b/src/components/text/__snapshots__/text.styles.test.ts.snap @@ -81,7 +81,6 @@ exports[`euiTextStyles sizes m 1`] = ` p, dl, blockquote, - img, pre, > ul, > ol { @@ -243,7 +242,6 @@ exports[`euiTextStyles sizes relative 1`] = ` p, dl, blockquote, - img, pre, > ul, > ol { @@ -390,7 +388,6 @@ exports[`euiTextStyles sizes s 1`] = ` p, dl, blockquote, - img, pre, > ul, > ol { @@ -537,7 +534,6 @@ exports[`euiTextStyles sizes xs 1`] = ` p, dl, blockquote, - img, pre, > ul, > ol { diff --git a/src/components/text/text.styles.ts b/src/components/text/text.styles.ts index 0bcc68b2c45..8e8a28dfd85 100644 --- a/src/components/text/text.styles.ts +++ b/src/components/text/text.styles.ts @@ -144,7 +144,6 @@ const euiScaleText = ( p, dl, blockquote, - img, pre, > ul, > ol { From 4a077e29d97979cb046b17bf805c29020f9dc9fb Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Mon, 13 Nov 2023 23:44:02 -0800 Subject: [PATCH 2/3] Actually just remove all `img` CSS from EuiText - why does text CSS even care about images? --- src/components/text/text.styles.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/text/text.styles.ts b/src/components/text/text.styles.ts index 8e8a28dfd85..fbafc8bb87c 100644 --- a/src/components/text/text.styles.ts +++ b/src/components/text/text.styles.ts @@ -248,11 +248,6 @@ export const euiTextStyles = (euiThemeContext: UseEuiTheme) => { ${euiLinkCSS(euiThemeContext)} } - img { - display: block; - ${logicalCSS('max-width', '100%')} - } - ul { list-style: disc; } From 7dd3b6f5a4bd525005b957af8d9efc1347fed823 Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Mon, 13 Nov 2023 23:46:15 -0800 Subject: [PATCH 3/3] changelog --- changelogs/upcoming/7360.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/upcoming/7360.md diff --git a/changelogs/upcoming/7360.md b/changelogs/upcoming/7360.md new file mode 100644 index 00000000000..18056dd00c7 --- /dev/null +++ b/changelogs/upcoming/7360.md @@ -0,0 +1 @@ +- Updated `EuiText` to no longer set any opinionated styles on child `` tags - use `EuiImage` for image display within text instead