diff --git a/src/elements/message/message.scss b/src/elements/message/message.scss index d54d86adbf..0b0426d926 100644 --- a/src/elements/message/message.scss +++ b/src/elements/message/message.scss @@ -28,6 +28,7 @@ ::slotted([slot='image']) { display: block; + margin-inline: auto !important; // overrides '.sbb-figure' margin margin-block: var(--sbb-message-image-margin-block) !important; // overrides '.sbb-figure' margin width: 100%; } diff --git a/src/elements/message/message.visual.spec.ts b/src/elements/message/message.visual.spec.ts index dfab902ca9..b355b9d1a2 100644 --- a/src/elements/message/message.visual.spec.ts +++ b/src/elements/message/message.visual.spec.ts @@ -63,6 +63,31 @@ describe(`sbb-message`, () => { await waitForImageReady(setup.snapshotElement.querySelector(testCase.imgSelector)!); }), ); + + it( + `small image ${testCase.title}`, + visualDiffDefault.with(async (setup) => { + await setup.withFixture(html` + + + ${testCase.imgTemplate()} + Please reload the page or try your search again later. + Error code: 0001 + + + `); + + await waitForImageReady(setup.snapshotElement.querySelector(testCase.imgSelector)!); + }), + ); } it(
Please reload the page or try your search again later.
Error code: 0001