Browse Source

Changed `<figure>` display property to `table` and `<figcaption>` to `table-caption`.

dkonopka 6 years ago
parent
commit
536c89f806

+ 3 - 2
packages/ckeditor5-image/theme/image.css

@@ -4,11 +4,12 @@
  */
 
 .ck-content .image {
+	display: block;
 	clear: both;
 	text-align: center;
 
-	/* Make sure there is some space between the content and the image. */
-	margin: 1em 0;
+	/* Make sure there is some space between the content and the image. Center image by default. */
+	margin: 1em auto;
 
 	& > img {
 		/* Prevent unnecessary margins caused by line-height (see #44). */

+ 4 - 0
packages/ckeditor5-image/theme/imagecaption.css

@@ -4,6 +4,10 @@
  */
 
 .ck-content .image > figcaption {
+	display: table-caption;
+	caption-side: bottom;
+	word-break: break-word;
+
 	color: hsl(0, 0%, 20%);
 	background-color: hsl(0, 0%, 97%);
 	padding: .6em;