Browse Source

Merge pull request #46 from ckeditor/t/44

Define more complete default image styles
Szymon Kupś 8 years ago
parent
commit
95eb9463a0
1 changed files with 10 additions and 2 deletions
  1. 10 2
      packages/ckeditor5-image/theme/theme.scss

+ 10 - 2
packages/ckeditor5-image/theme/theme.scss

@@ -20,13 +20,21 @@
 }
 
 // Image widget's styles.
-.ck-widget.image {
+.image {
 	text-align: center;
 	clear: both;
 
 	&.image-style-side {
-		display: inline-block;
 		float: right;
 		margin-left: 0.8em;
+		max-width: 50%;
 	}
 }
+
+.image > img {
+	// Prevent unnecessary margins caused by line-height (see #44).
+	display: block;
+
+	// Center the image if its width is smaller than content's width.
+	margin: 0 auto;
+}