From 298beae1ccb8521770f659acfe39b4828e2b789d Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Mon, 13 Mar 2017 12:34:04 +0100 Subject: [PATCH 1/2] Fix: The image goes beyond the boundaries of the parent block. Closes #67. --- theme/imagecaption/theme.scss | 1 - theme/theme.scss | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/theme/imagecaption/theme.scss b/theme/imagecaption/theme.scss index f0cdc92d..ea68bc09 100644 --- a/theme/imagecaption/theme.scss +++ b/theme/imagecaption/theme.scss @@ -22,6 +22,5 @@ @include ck-box-shadow( $ck-inner-shadow ); background-color: ck-color( 'background' );; } - } } diff --git a/theme/theme.scss b/theme/theme.scss index d5289c64..1a8e6971 100644 --- a/theme/theme.scss +++ b/theme/theme.scss @@ -37,4 +37,8 @@ // Center the image if its width is smaller than content's width. margin: 0 auto; + + // Make sure the image never exceeds the size of the parent container (#67). + max-width: 100%; + max-height: 100%; } From b8eb00277b93b09c168637c8b8c6e7cf9f96f940 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Mon, 13 Mar 2017 13:08:31 +0100 Subject: [PATCH 2/2] Simplified the fix by restricting the image's width only. --- theme/theme.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/theme/theme.scss b/theme/theme.scss index 1a8e6971..f6ca039f 100644 --- a/theme/theme.scss +++ b/theme/theme.scss @@ -40,5 +40,4 @@ // Make sure the image never exceeds the size of the parent container (#67). max-width: 100%; - max-height: 100%; }