浏览代码

Configured the content styles so media use all the available horizontal space.

Aleksander Nowodzinski 7 年之前
父节点
当前提交
98d2130fc0
共有 1 个文件被更改,包括 3 次插入8 次删除
  1. 3 8
      packages/ckeditor5-media-embed/theme/mediaembed.css

+ 3 - 8
packages/ckeditor5-media-embed/theme/mediaembed.css

@@ -8,7 +8,6 @@
 .ck-content .media {
     & .ck-media__wrapper {
 		margin: 0 auto;
-		max-width: 640px;
 
 		& > *:not(.ck-media__placeholder) {
 			pointer-events: none;
@@ -34,22 +33,18 @@
 				text-overflow: ellipsis;
 				overflow: hidden;
 				color: hsl(0, 0%, 46%);
-				max-width: 80%;
 				white-space: nowrap;
 				text-align: center;
 
+				/* Otherwise the URL will overflow when the content is very narrow. */
+				max-width: 100%;
+
 				&:hover {
 					color: hsl(0, 0%, 0%);
 				}
 			}
 		}
 
-		&[data-oembed-url*="youtube.com"],
-		&[data-oembed-url*="vimeo.com"] {
-			max-width: 640px;
-			max-height: 360px;
-		}
-
 		&[data-oembed-url*="open.spotify.com"] {
 			max-width: 300px;
 			max-height: 380px;