Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiText] Remove opinionated styles on child img tags #7360

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/upcoming/7360.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Updated `EuiText` to no longer set any opinionated styles on child `<img>` tags - use `EuiImage` for image display within text instead
4 changes: 0 additions & 4 deletions src/components/text/__snapshots__/text.styles.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ exports[`euiTextStyles sizes m 1`] = `
p,
dl,
blockquote,
img,
pre,
> ul,
> ol {
Expand Down Expand Up @@ -243,7 +242,6 @@ exports[`euiTextStyles sizes relative 1`] = `
p,
dl,
blockquote,
img,
pre,
> ul,
> ol {
Expand Down Expand Up @@ -390,7 +388,6 @@ exports[`euiTextStyles sizes s 1`] = `
p,
dl,
blockquote,
img,
pre,
> ul,
> ol {
Expand Down Expand Up @@ -537,7 +534,6 @@ exports[`euiTextStyles sizes xs 1`] = `
p,
dl,
blockquote,
img,
pre,
> ul,
> ol {
Expand Down
6 changes: 0 additions & 6 deletions src/components/text/text.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ const euiScaleText = (
p,
dl,
blockquote,
img,
pre,
> ul,
> ol {
Expand Down Expand Up @@ -249,11 +248,6 @@ export const euiTextStyles = (euiThemeContext: UseEuiTheme) => {
${euiLinkCSS(euiThemeContext)}
}

img {
display: block;
${logicalCSS('max-width', '100%')}
}

ul {
list-style: disc;
}
Expand Down
Loading